minor optmizations:
dont rehash traversally. only rehash current node and children.
dont traverse up the tree if no cancellations are going to happen