Fix and test the existing implementation for plain Lua pages