Fixed missing lua_pops after calls to lua_len

I think this could have caused some problems, although someone more authoritative on lua might know for sure.