Ignore modules which we didn't see during loading

This can be the case when we have multiple entry points and so we can see a
synthesized module during "optimize-tree" phase.