When you delete a document in the docmanager and this document is a folder that contains more document than that document only is set as deleted and not the document below and when you delete remove that document completely then you get ghostdocument that have no parents. I had to delete the documents by hand in the DB.
Dimmy