Fix lua stack balance in LuaHRef(). And get rid of an unused var.