Fix implementation of foldTree

It should not include the data inside the Branch nodes, just the leaf
nodes (Finish)