Fix #676.

The culprit of the problem is the function `simplifyCondTree`, which traverses `CondTree` in post-order.  I've changed that to pre-order traversal.