Fix a bug when copied iterators became invalid.
Merge pull request #165.