Added test revealing bugs with generation of variable expressions