Fixed #23556 -- Raise a more meaningful error message when migrations refere to a unavailable migration