get rid of most other uses of lua_ref