Fixed #22970: Incorrect dependencies for existing migrated apps