LUIF-to-Lua: fix lua table building logic