[WFLY-2466] Synchronize on collection when iterating