This is a consequence of a compiler bug in the version of LuaJIT with which your Luanti executable was compiled. On ARM systems, you are recommended to compile Luanti with the very latest version of LuaJIT available, or you will be beset with miscompilations such as this one.
Cannot get around the problem using either Brew or Ports. Brew just doesn't want to enter developer mode right…