Add some constraint checking to archive

This makes it suitable for use during account cancelation.

Follow-on from #2468.