Reset Image.archived flag where necessary (Fix #11810)

During the upgrade testing of nightshade for 5.0.0-beta2-rc3,
images were found which had incorrect `archived`. This won't
prevent the flags from being mis-set again, but for starting
with `5.0__0` it will at least be consistent.