ConcurrentModification at switching provider fixed

This fixes bug 5237.