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)