Do system.object type scan after all references are loaded. Fixes #12991