[1.7.x] Fixed #22951 -- Checked for types during deep_deconstruct migration serializ

Thanks Sam Hartsfield for the report.

Backport of 4680d25df2 from master