Mike Pall's LuaJIT forloop fixes.