What if you check on the lambda, if you're currently already in a destination which has your top level destination on the hierarchy, do popUpTo(the top level destination, inclusive = false) without saving state here (since you're clearing all of the things deeper in the backstack anyway.
If that top level destination isn't in the hierarchy, do what you were doing already