That method calls Map.remove while iterating said Map. The code fragment:
if ( removeIt ) { uniqueKeys.remove( uniqueKeyEntry.getKey() ); }
should really read:
if ( removeIt ) { // 'uniqueKeyEntries' is the Iterator uniqueKeyEntries.remove(); }