[1.7.x] Fixed #23008 -- Fixed typo causing bad migration dependencies.

Thanks semenov for the report and Florian for investigation.

Backport of 9a2ab62977 from master