             var mergedChanges: [TableViewChange<Record>] = []
             var updateChanges: [TableViewChange<Record>] = []
             for change in changes {
-                if let (mergedChange, mergedIndex) = merge(change: change, in: mergedChanges, compareItems: compareItems) {
+                if let (mergedChange, mergedIndex) = merge(change: change, in: mergedChanges, identicalItems: identicalItems) {
                     mergedChanges.remove(at: mergedIndex)
                     switch mergedChange {
                     case .update:

                    // Look for a matching insertion
                    for (index, otherChange) in changes.enumerated() {
                        guard case .insertion(let newItem, let newIndexPath) = otherChange else { continue }
                        guard compareItems(oldItem, newItem) else { continue }
                        let rowChanges = changedValues(from: oldItem.row, to: newItem.row)
                        if oldIndexPath == newIndexPath {
                            return (TableViewChange.update(item: newItem, indexPath: oldIndexPath, changes: rowChanges), index)

        }
        
        /// Returns an array where deletion/insertion pairs of the same element are replaced by `.move` change.
        func standardize(changes: [TableViewChange<Record>], identicalItems: ItemComparator<Record>) -> [TableViewChange<Record>] {
            
            /// Returns a potential .move or .update if *change* has a matching change in *changes*:
            /// If *change* is a deletion or an insertion, and there is a matching inverse
            /// insertion/deletion with the same value in *changes*, a corresponding .move or .update is returned.
            /// As a convenience, the index of the matched change is returned as well.
            func merge(change: TableViewChange<Record>, in changes: [TableViewChange<Record>], identicalItems: ItemComparator<Record>) -> (mergedChange: TableViewChange<Record>, mergedIndex: Int)? {
                
                /// Returns the changes between two rows: a dictionary [key: oldValue]
                /// Precondition: both rows have the same columns
