(PUP-751) Fix resource_type to check for changes

Since known_resource_types on the Environment no longer checks for stale
files, any users of that are going to be working in a long running
process need to ensure that the stale check is made before trying to use
the known_resource_types. The only place, besides the compiler, that
does this is the resource_type indirection. This adds that check there.