Added code to handle that a document can be deleted in the Document index, but still in the iindex.