Fix Lua/C API typecheck error for special indexes.