Fix some various issues that popped up because the linker now doesn't load import libraries for longer than it needs to.
These are all use after free issues.
|No Unit Test Coverage|
|Build 53755: [GHC] Linux/amd64: Continuous Integration|
|Build 53754: [GHC] OSX/amd64: Continuous Integration|
|Build 53753: [GHC] Windows/amd64: Continuous Integration|
|Build 53752: arc lint + arc unit|