Fixed #23950 -- Prevented calling deconstruct on classes in MigrationWriter.