CB-8031 Fix race condition that shows as ConcurrentModificationException