Fix a cache bug on document reexamination