Fixed #23410 -- Avoided unnecessary rollbacks in related apps when migrating backwards.