anchor.diff:  
           let lastLeaf = leaves.[0].page
   
  -        let writeParentNodes children startingPageNumber startingBoundaryPageNumber =
  +        let writeParentNodes (startingBlk:PageBlock) children =
               // 2 for the page type and flags
               // 2 for the stored count
               // 5 for the extra ptr we will add at the end, a varint, 5 is worst case
  
positive.code:             items:pgitem list 
              overflows:Map<byte[],int32>
              nextGeneration:pgitem list 
              nextPage:int 
              boundaryPage:int 
          }
  
      type private LeafState =
  
negative.code:             // this is the body of writeParentNodes
              // children is in reverse order.  so List.head children is actually the very last child.
              let lastChild = List.head children
              let initialState = {nextGeneration=[];sofar=0;items=[];blk=startingBlk;overflows=Map.empty}
              let middleState = List.foldBack foldParent (List.tail children) initialState 
              let isRootNode = (List.isEmpty middleState.nextGeneration)
              let finalState = writeParentPage middleState lastChild isRootNode
              let {blk=blk;nextGeneration=ng} = finalState
              (blk,ng)
  
          let rec writeOneLayerOfParentPages (blk:PageBlock) (children:pgitem list) :int32 =
              if children.Length > 1 then
                  let (newBlk,newChildren) = writeParentNodes blk children
                  writeOneLayerOfParentPages newBlk newChildren
              else
                  children.[0].page
  
          let rootPage = writeOneLayerOfParentPages (PageBlock(pageAfterLeaves, boundaryAfterLeaves)) leaves
  
          let g = pageManager.End(token, rootPage)
          (g,rootPage)
  