Correctly handle resurrected documents

I think it should be a separate test. We can remove the check from this line.