You might want to check out the thread starting here:
http://lua-users.org/lists/lua-l/2018-11/msg00386.html
-spc
Interesting. So _ENV may not exist as an upvalue, as I have just verified in the REPL. Still, chunks (as opposed to explicit functions) are guaranteed to have an _ENV upvalue, and that guarantee may be all I need for my project.