Implemented idempotence of hasNext()