Lua XIP patches

Remaking because of public-ification