 <p>Why not just avoid the iterator all together as this code seems to work just fine for your implementation of <code>putAll</code>:</p> <pre><code>for(String s: m.keySet()){ put(s.toLowerCase(), m.get(s)); } </code></pre> <p>As to why you can't seem to work around that error, I have no idea. I tried multiple variants and nothing seemed to work.</p>