Avoid the Set -> List operation that seems to happen on every iteration, according to profiling info