Answer
Recompile in dependency order rather than one object at a time, and check whether the invalid objects depend on something the upgrade actually changed versus something unrelated that was already broken. This is a database/release-management question best confirmed against your release's upgrade notes, not guessed from the error alone.