collectDocumentsAndAttachments merged a folder/file sharing a title by scanning
the sibling list with out.find(d => d.title === child.title) once per child —
O(n²) over the number of siblings in one directory, which for a flat import can
be large. Index the siblings by title in a Map and look up in O(1). First
occurrence wins, matching find; the merge still mutates the same object.