Ensure next() and hasNext() behaviour doesn't change

JAVA-1255