+ // Then look for `e` in `G`. It's possible `e` was already constructed
+ // in the past, in which case we can simply re-use it.
+ //
+ // Note, though, that in this case we must move the event in `G` into
+ // `U`: we've inserted `e` into the unfolding, so we expect it to be in `U`
+ if (auto loc = std::find_if(G.begin(), G.end(), [=](const auto e_i) { return *e_i == *handle; }); loc != G.end()) {
+ const auto* e_equiv = *loc;
+ G.remove(e_equiv);
+ U.insert(e_equiv);
+ return e_equiv;
+ }
+
+ // Otherwise `e` is truly a "new" event
+ this->U.insert(handle);