anchor.diff:  
                   return! (nextMessage nextIndex) }
               and groupComplete group itemIndex = async {
  -                let values = groupItems.Item group
  -                if (not (values.Items |> List.isEmpty)) then
  -                    workQueue.Enqueue(group)
  -                else
  -                    groupItems.Remove group |> ignore
  +                state.GroupComplete group
  +                
   
                   return! nextMessage itemIndex }
               and consume (workCallback, reply) itemIndex = async {
  -                let nextKey = workQueue.Dequeue()
  -                let values = groupItems.Item nextKey
  +
  +                let (nextKey, values) = state.ConsumeNext()
                   let work =
                       async {
                           try
  
positive.code:                     if(itemIndex = 0L) then
                          reply.Reply()
                      else 
                          lastCompleteTracker.NotifyWhenComplete(itemIndex - 1L, Some "NotifyWhenComplete empty", async { reply.Reply() } )
                      Some(empty itemIndex)
                  | GroupComplete group -> Some(groupComplete group itemIndex)
                  | _ -> None)
  
negative.code:   | GroupComplete of 'TGroup
    | NotifyWhenAllComplete of AsyncReplyChannel<unit>
  
  type internal MutableOrderedGroupingBoundedQueueState<'TGroup, 'TItem when 'TGroup : comparison> () =
      // normal .NET dictionary for performance
      // very mutable
      let groupItems = new System.Collections.Generic.SortedDictionary<'TGroup, GroupEntry<'TItem>>()
  
      let workQueue = new System.Collections.Generic.Queue<'TGroup>()
  
      let mutable itemIndex = 0L
      let mutable lastIndex = -1L
  
      member x.GetGroupItemsCount () =
          let g = groupItems
          g.Count
  
      member x.GetWorkQueueCount () =
          workQueue.Count
  
      member x.AddItemToGroup item group =
          let (exists, value) = groupItems.TryGetValue(group)
          let value = 
              if exists then
  