Fixed error of mixing iterators from different collections (but same collection type).