Changed env cache map to a identityHashMap to ensure no cached env gets overwritten by an equal but not the same ast element.