Fix currently broken data migration

Because the orphan CIP pages may belong to the same document, the document might not exist as it may have been destroyed already in a previous iteration.