Remove JoinTraverse.

This is an abstraction currently just used in one place that basically turns a tree into an identical tree before flattening it. It seemed clearer to just build the direction list directly.