Don't increment environment pointer past the end.

This should not effect correct programs, since once the
iterator itself is past-the-end, it should not matter what
the underlying state of that iterator is. But, the new behaviour
is more obvious.