Finding all paths between two nodes in a hierarchy.