I'm not sure what's the cause and I don't know enough about dmd's internals to make an educated guess, but I'm pretty sure this is a bug in dmd and not in LuaD.
Indeed it is a DMD regression. I haven't been able to reduce it yet, so your example is intriguing. It's pretty much a total blocker for using LuaD in 2.064.
/insert expletives about DMD
