CID 1240027: Reset iterator when erase() called

iterator is invalidated when erase() is called: we need to re-fetch the beginning