fix 2 bugs in simplification of boolean conditions in piecewise functions.
fix 2 bugs in simplification of boolean conditions in piecewise functions.

zachsully/hakaru,zaxtax/hakaru,zachsully/hakaru,zaxtax/hakaru