Please use the Injector::nest and Injector::unnest here. That way unnest will revert everything to the exact same state (which registerService only partially does).