The function as written does not include an upvalue, but refers to a global instead. It needs to be preceded by something like local x to work. (Also note that you want 90 as a third argument, now you're changing it to a table instead.)
Regardless, love uses an unmodified version of luajit, so if it doesn't work, it's not a bug in love.
There is a discussion around this issue in which Mike Pall (creator of Luajit) participates in: https://github.com/LuaJIT/LuaJIT/pull/46
I can be wrong, but it is my understanding that once a path is traced-compiled, you won't be able reach a local variable using its identifier via the debug library (the identifier of a variable is meaningless, unless its a key in a table).
Mike Pall set this issue asa "won't fix", so there isn't much you can do.