Do not modify frozen string

bnc#906694
more effective method `each_key` http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-each_key