More work on migrations and timing the APDocumentScanFinished notification