Use of each() on hash after insertion without resetting hash iterator results in undefined behavior, Perl interpreter: 0x.