The .konanLibrary is cached for each declaration for performance purposes, but it is only ok to do it
after IR has been lowered to its final state (or at least when declarations aren't being moved around),
so the fix respects that by only taking .konanLibrary of a IrFile (it is assumed that files stay on their place
during entire backend lowering procedure).
The .konanLibrary is cached for each declaration for performance purposes, but it is only ok to do it after IR has been lowered to its final state (or at least when declarations aren't being moved around), so the fix respects that by only taking .konanLibrary of a IrFile (it is assumed that files stay on their place during entire backend lowering procedure).