buildflat exposes new interface that maps from a tree node to the set of flatnodes...