I guess my conclusion was a classic case of
false causlity. In the original post, there are at least 2 different masks present for all the small buttons and another mask for the big buttons. No Lua code touches the large round masks because the template has that mask texture by default, so they're unaffected by the bug.