Fixed iterator operations race.
Additional tests for iterators.