May be, but this "j" upvalue is not referenced at all in the function; there's then no point at all to create a new separate closure for each distinct value of the const "j".
All this causes unnecessary stress on the memory allocator (and later on the garbage collector): imagine that instead of performing 2 loops, you loop one million times, it will then allocate one million objects with needless contents for the distinct j constant never used: that's what I all a regression, which can be severe and can affect serious projects, where there are lot of loops spread everywhere and the regression will create really too many needless distinct closures, causing a severe degradation in terms of memory usage.
Then if the generated reduced closures are identical, there's no need at all to duplicate them. In the example given, the closure should always have an empty set of upvalues, so the same function closure can be safely shared: the value of j does not matter at all, it's never accessed, never needed by the function body.
So I consider this to be a severe regression bug in Lua 5.4.