Much more efficient processing

Rather than expanding duplicate entries in the tree or trying to copy
over memoized expansions, we just stop growing the tree when we get to a
reduced_value that has been seen before. Then, when we traverse the
tree, we remember to check for memoized children for each node.