Fixed #23560 -- Fixed MigrationWrite to handle builtin types without imp...

...orts.
I there a reason not to assert an empty set?