Iterator related fixes

Here some more iterator related fixes:
- prefer prefix --/++operator for iterators
- fix iterator handling related to usage of erase() in two cases