Merge "Defer destroy activity if it is in transition." into main