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 53657: [GHC] Linux/amd64: Continuous Integration|
|Build 53656: [GHC] OSX/amd64: Continuous Integration|
|Build 53655: [GHC] Windows/amd64: Continuous Integration|
|Build 53650: arc lint + arc unit|