Not that easy after all
After all, the optimisation for variables in queries is not that easy. I am too lazy to explain the problem in detail, but in short, to make it work correctly, I have to move variable declarations around in the AST (let and record selection). This makes everything quite a bit more complicated. Then also, I must admit, I am not working at maximum efficiency these days: it will get better, I hope.