Don't copy list for iteration.
Merge pull request #2508 from tomwys/patch-1

Don't copy list for iteration.