speed up front end

Speeds up sysimg build and package loading a bit, which we are starting to really need.

This works, but might be different with respect to error reporting in a few cases. Might need a little more tinkering.