DONT MERGE (PUP-1515) Spike patch for autoloading providers

Prior to this patch, providers were not always being loaded from the same
environment as types. This caused Types to be loaded without providers and
catalog compilation to fail during validation with "Invalid parameter
provider".

This is a spike for evaluation purposes only. There are no tests and no guarantees.