Fix 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.
Merge pull request #1911 from alphagov/fix-data-migration

Fix currently broken data migration