Make a copy of list before iterating over
About #417
Add comment to explain modification.
Merge pull request #423 from nicolas-f/fix/concurrent-modif

Make a copy of list before iterating over it.

Fixes #421. See also #417.