TEZ-1542. Fix a Local Mode crash on concurrentModificationException.
Contributed by Chen He.
(cherry picked from commit 9e1eb5277dccfc16bebe07bab86351ff258bdd45)