Avoid comparing invalidated iterators.
Merge pull request #7020 from unknownbrackets/jit-minor

Avoid comparing invalidated iterators