After some more trial-and-error, I found that our build system was pulling in Lua headers from a different Lua distribution before those of LuaJIT's. This was causing the corrupt stack.
After removing the hard-coded #include
directives to the old distribution, and properly putting LuaJIT's headers on the compile path, I was able to successfully manipulate the global stack again.