Reimplement Element metatable in C