Use more efficient entrySet iterator.