patch 2 from lua.org

When loading a file, Lua may call the reader function again after it returned end of input.