[PDI-12893] - Exception in thread "main" java.util.ConcurrentModificationException

@mattyb149, @brosander would you mind to review/merge

there are two commits:
    the first one is the JUnit test for reprodusing.
    the second one provides the fix.

Thanks, Yury.
Shouldn't we use stringPropertyNames() so that we're guaranteed not to get ClassCastExceptions when casting both key and value to Strings?