fix switch transform for new bool-binop code
make sure the bool-binop arguments are side-effect free when reusing them
fix tests