Use a Lua metatable for inherited function resolution.