Derived flat_set from flat_tree to avoid redefining almost all functions and minimize instantiation of multiple function in debug mode.