It's not a good idea. Associative array hash should'n depend on foreach order. However, foreach order can be changed during, for example, rehashing. Thus two copies of one aa with different `buckets.length` will have a different hash values.