 extension MutableObservableCollection {
     public func replace(with list: UnderlyingCollection) {
         lock.lock(); defer { lock.unlock() }
-        self.list = list
-        subject.next(ObservableCollectionEvent(change: .reset, source: self.list))
+        collection = list
+        subject.next(ObservableCollectionEvent(change: .reset, source: collection))
     }
 }
 

    
    fileprivate func offsetIndex(_ index: UnderlyingCollection.Index, by offset: Int) -> UnderlyingCollection.Index {
        var offsetIndex = index
        list.formIndex(&offsetIndex, offsetBy: offset)
        return offsetIndex
    }
    

        if performDiff {
            lock.lock()
            
            
            let diff = collection.extendedDiff(list)
            subject.next(ObservableCollectionEvent(change: .beginBatchEditing, source: collection))
            collection = list
            for step in diff {
                switch step {
                case .insert(let index):
                    
                    subject.next(ObservableCollectionEvent(change: .inserts([index]), source: collection))
                case .delete(let index):
                    
                    subject.next(ObservableCollectionEvent(change: .deletes([index]), source: collection))
                case .move(let from, let to):
                    subject.next(ObservableCollectionEvent(change: .move(from, to), source: collection))
                }
            }
            
            subject.next(ObservableCollectionEvent(change: .endBatchEditing, source: collection))
            lock.unlock()
        } else {
            replace(with: list)
