Hi,
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.