Fixed #23418 -- Fail when migration deconstruct produces invalid import