Removing the last instance of a subgraph recursed unconditionally into
nested definitions: a nested definition still instanced elsewhere had its
inner nodes' badge registrations stripped and removal lifecycle fired
while live, while a definition referenced only inside the removed subtree
leaked its link topologies, reroute chains, and registry entry forever.
Compute the releasable set by excluding the removed instance from the
live-reference walk, then release each definition exactly once: lifecycle
first, then badge/link/reroute unregistration and registry removal.