Fix beug with #next raising after the end

... instead of the old behavior or just returning nil again