Even weider: sometimes, lua_dump will replace the dumped closure at the top of the stack with a full userdata, instead of leaving the stack unchanged.Are you certain that the writer supplied to lua_dump is not the one leaving the full userdata at the top of the stack? While lua_dump should not change the stack the writer could do so.
Regards, Xmilia