Turns out we get a test failure if this call is removed. It's creating a copy of the set before yielding, since each iteration adds more elements to the same set. I added a comment explaining why this copy is necessary, thanks for catching this!