Fixed #23650 -- Prevented migrate to call check framework three times

Thanks Ilya Baryshev for the report.