This seems to be a bug, and is currently with Qlik support.
Also, looks like I missed an important part of the story.
This error does not occur, if I use static variables.
It happens when I used an expression in a variable and then use a dollar sign expansion with the variable, at run-time to switch dimensions. It throws an error, when using such in the 2nd dimension in a graph.