Use a flat map rather than a unordered map when performing the union of flat nodes.