Fix bug when passing type with holder by value to Lua.