Hi,
I'm sending this again, because for some reason the last time I sent this it ended up unreadable.
I have found an error that forces the programmer to write backwards compatible code if the target is default-compiled Lua 5.3.x.
If LUA_COMPAT_IPAIRS is defined (which it is by default), Lua always ignores __index and only checks for __ipairs.
Therefore ipairs does not work for userdata with an adequate __index field.