Fix and test case for the 'resurrected document' case