                         continue
                     }
                     
-                    collectionResult.append((
-                        index: index,
-                        score: totalScore / Double(scores.count),
-                        results: propertyResults
-                    ))
+                    // This write doesn't technically need to be `sync` but
+                    // that simplifies coordination with the dispatch group
+                    // and it should execute very quickly anyway.
+                    collectionResultQueue.sync {
+                        collectionResult.append((
+                            index: offset + index,
+                            score: totalScore / Double(scores.count),
+                            results: propertyResults
+                        ))
+                    }
                 }
                 
                 group.leave()

        
        var items = [SearchResult]()
        
        let group = DispatchGroup()
        let count = aList.count
        
        stride(from: 0, to: count, by: chunkSize).forEach {
            let chunk = Array(aList[$0..<min($0 + chunkSize, count)])
            group.enter()
            self.searchQueue.async {
                for (index, item) in chunk.enumerated() {
                    if let result = self.search(pattern, in: item) {
                        items.append((index, result.score, result.ranges))
                    }
                }
                

        }
        
        group.notify(queue: self.searchQueue) {
            // This read does not need to be protected by the queue given that
            // there's no longer concurrent access at this point.
            let sorted = collectionResult.sorted { $0.score < $1.score }
            DispatchQueue.main.async {
                completion(sorted)
