Feature/master/pup 1699 cache environments

Add cacheing for the new environment loaders, and attempt to sort through the fallout.  This supercedes #2566