Add support for flat trees.