Swap set::insert for std::set_union. Force DAG input for DAG reachability.