Exposed flattenHierarchy().