Yep, it's the typical case of either assuming every identifier given as a key is actually a string and disallowing variables as keys.
Or alternatively requiring a way to quote variables from the local scope (or possibly any expression returning a string). Or as a final alternative doing the hacky thing that's kind of fun, but not advised for serious code: abuse `declaredInScope` for a CT check if something is a local variable or not.
