ENG-4537 Fix infinite loop in CopyOnWriteTest.