Allow invalidated archive data to be used until they are re-processed

Added DONE_INVALIDATED flag to archiving and considering it when fetching archives
can you explain t1.idarchive != t2.idarchive  ?