Thank you for the detailed explanation.
I think that the disconnect here is that I am trying (**really,
really, really hard**) to implement what Roberto Ierusalimschy
recommends in chapter 25 (pp. 261-264) of *Programming in Lua*, 4th
ed., while you (and Coda Highland) are of the opinion (I think) that
such a strategy is unnecessary. (Apologies if I misunderstood.)
In other words, I am not trying to solve any practical problem; I am
only trying to understand the book's approach to sandboxing. At the
moment, I think that I still don't understand it (because I cannot put
it into practice satisfactorily).