Use named variable for LuaRef in equipSet callback setting

This works around a bug happening on Mac OS X (and perhaps clang as
well). (Closes #2993)
If I understand correctly, `ScopedTable` should remove the table when it goes out of scope, which doesn't happen till *after* LUA_DEBUG_END has done its check. So why does this work?