Reduce redundancy in constrain().
Draw trees from back to front.