anchor.diff:              // 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=[];nextPage=startingPageNumber;boundaryPage=startingBoundaryPageNumber;overflows=Map.empty}
  +            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 {nextPage=n;boundaryPage=b;nextGeneration=ng} = finalState
  -            (n,b,ng)
  -
  -        let rec writeOneLayerOfParentPages next boundary (children:pgitem list) :int32 =
  +            let {blk=blk;nextGeneration=ng} = finalState
  +            (blk,ng)
  +
  +        let rec writeOneLayerOfParentPages (blk:PageBlock) (children:pgitem list) :int32 =
               if children.Length > 1 then
  -                let (newNext,newBoundary,newChildren) = writeParentNodes children next boundary 
  -                writeOneLayerOfParentPages newNext newBoundary newChildren
  +                let (newBlk,newChildren) = writeParentNodes blk children
  +                writeOneLayerOfParentPages newBlk newChildren
               else
                   children.[0].page
   
  -        let rootPage = writeOneLayerOfParentPages pageAfterLeaves boundaryAfterLeaves leaves
  +        let rootPage = writeOneLayerOfParentPages (PageBlock(pageAfterLeaves, boundaryAfterLeaves)) leaves
   
           let g = pageManager.End(token, rootPage)
           (g,rootPage)
  
positive.code: 
          let lastLeaf = leaves.[0].page
  
          let writeParentNodes children startingPageNumber startingBoundaryPageNumber =
              // 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
  
negative.code:                         st
  
                  let addKeyToParent st = 
                      let {sofar=sofar; items=items; blk=blk; overflows=overflows} = st
                      let stateWithK = {st with items=pair :: items}
                      if calcAvailable sofar (List.isEmpty st.nextGeneration) >= neededForInline then
                          {stateWithK with sofar=sofar + neededForInline}
                      else
                          let keyOverflowFirstPage = blk.firstPage
                          let kRange = writeOverflow blk (new MemoryStream(k))
                          {stateWithK with sofar=sofar + neededForOverflow; blk=kRange; overflows=overflows.Add(k,keyOverflowFirstPage)}
  
  
                  // this is the body of the foldParent function
  