Make auto_archive check more defensive