anchor.diff:          // on removal, the next valid value is the previous one and all downstreams must reposition and replay from it
           if index > 0 then updateEvent.Trigger(this.GetPairByIndexUnchecked(index - 1)) // after removal (index - 1) is unchanged
           else updateEvent.Trigger(Unchecked.defaultof<_>)
  -    finally
  +    //finally
         exitLockIf syncRoot entered
   
     member this.Remove(key):bool =
       let entered = enterLockIf syncRoot isSynchronized
  -    try
  +    //try
  +    let ret = 
         let index = this.IndexOfKey(key)
         if index >= 0 then this.RemoveAt(index)
         index >= 0
  -    finally
  -      exitLockIf syncRoot entered
  +    //finally
  +    exitLockIf syncRoot entered
  +    ret
   
     // TODO first/last optimization
     member this.RemoveFirst([<Out>]result: byref<KVP<'K,'V>>):bool =
       let entered = enterLockIf syncRoot  isSynchronized
  -    try
  +    //try
  +    let ret =
         try
           result <- this.First // could throw
           let ret = this.Remove(result.Key)
           ret
         with | _ -> false
  -    finally
  -      exitLockIf syncRoot entered
  +    //finally
  +    exitLockIf syncRoot entered
  +    ret
   
     // TODO first/last optimization
     member this.RemoveLast([<Out>]result: byref<KeyValuePair<'K, 'V>>):bool =
       let entered = enterLockIf syncRoot  isSynchronized
  -    try
  +    //try
  +    let ret =
         try
           result <-this.Last // could throw
           this.Remove(result.Key)
         with | _ -> false
  -    finally
  -      exitLockIf syncRoot entered
  +    //finally
  +    exitLockIf syncRoot entered
  +    ret
   
     /// Removes all elements that are to `direction` from `key`
     member this.RemoveMany(key:'K,direction:Lookup):bool =
       let entered = enterLockIf syncRoot  isSynchronized
  -    try
  +    //try
  +    let ret = 
         if this.size = 0 then false
         else
           let pivotIndex,_ = this.TryFindWithIndex(key, direction)
  
positive.code: 
    override this.GetCursor() = this.GetCursor(-1, version, Unchecked.defaultof<'K>, Unchecked.defaultof<'V>)
      
    // TODO replace with a sealed concrete class, there are too many virtual calls and reference cells in the most critical paths like MoveNext
    member internal this.GetCursor(index:int,cursorVersion:int,currentKey:'K, currentValue:'V) =
      //SortedMapCursor(this, index, cursorVersion, currentKey, currentValue) :> ICursor<'K,'V>
      let index = ref index
  
negative.code:           this.values <- vArr
            OptimizationSettings.ArrayPool.ReturnBuffer(toReturn)
          | _ -> ()
        //finally
          exitLockIf syncRoot entered
  
    member this.Comparer with get() = comparer
  