Yes, you are right. It would require at least the debug library to get around it. But even in that case; as in the comments mentioned, it only offers weak protection, so you may want to leave the `__metatable=false` out all together. That should suffice to prevent accidental writes. But of your goal is to protect better than that, it won't suffice ofcourse.

Another comment while reading the code again; I think the call to `error()` should use the PL error methods