Fix problem with mutating global cache during enumeration for deep mutable copy.