[linker]: Fix my previous commit.

We need to resolve all the TypeReferences before we update their scopes.
After setting the scope to null, calling Resolve() on a nested child would
crash.