Fixed #23101: Prefer doing deletes before creates in autodetector.

Makes declined or missed renames still work (but drop data).