anchor.diff:                              let newRange = pageManager.GetRange(token)
                               nextPageNumber <- fst newRange
                               boundaryPageNumber <- snd newRange
  -                            // assert pb.Position <= (pb.PageSize - 4)
  +                            // assert pb.Position <= (pageSize - 4)
                               pb.SetLastInt32(nextPageNumber)
                           else
                               nextPageNumber <- nextPageNumber + 1
                       pb.Flush(fs)
  -                    if nextPageNumber <> (thisPageNumber+1) then utils.SeekPage(fs, pb.PageSize, nextPageNumber)
  +                    if nextPageNumber <> (thisPageNumber+1) then utils.SeekPage(fs, pageSize, nextPageNumber)
                       nextGeneration.Add(thisPageNumber, snd children.[i-1])
                       sofar <- 0
                       first <- 0
  
positive.code: 
          writeOneBlock 0 startingNextPageNumber startingBoundaryPageNumber
  
      let private buildParentPage (overflows:System.Collections.Generic.Dictionary<int,int32>) (pb:PageBuilder) (children:System.Collections.Generic.List<int32 * byte[]>) stop start =
          // assert stop > start
          let countKeys = stop - start
          pb.Reset ()
          pb.PutByte (PARENT_NODE)
          pb.PutByte (0uy)
          pb.PutInt16 (countKeys)
          // store all the ptrs, n+1 of them
          // note loop bounds
          for q in start .. stop do
              pb.PutVarint(int64 (fst (children.[q])))
          // store all the keys, n of them
          // note loop bounds
          for q in start .. (stop-1) do
              let k = snd children.[q]
              if ((overflows <> null) && overflows.ContainsKey (q)) then
                  pb.PutByte(FLAG_OVERFLOW)
                  pb.PutVarint(int64 k.Length)
                  pb.PutInt32(overflows.[q])
              else
                  putArrayWithLength pb k
  
      let private calcAvailable pageSize currentSize couldBeRoot =
          let basicSize = pageSize - currentSize
          let allowanceForRootNode = if couldBeRoot then sizeof<int32> else 0 // first/last Leaf, lastInt32 already
          basicSize - allowanceForRootNode
  
      let private writeParentNodes (pageManager:IPages) token firstLeaf lastLeaf (children:System.Collections.Generic.List<int32 * byte[]>) startingPageNumber startingBoundaryPageNumber fs (pb:PageBuilder) (pbOverflow:PageBuilder) =
          let nextGeneration = new System.Collections.Generic.List<int32 * byte[]>()
          let overflows = new System.Collections.Generic.Dictionary<int,int32>()
          // TODO encapsulate mutables in a class?
  
negative.code:             let isLastChild = (i = (children.Count - 1))
              if (sofar > 0) then
                  let couldBeRoot = (nextGeneration.Count = 0)
                  let avail = calcAvailable sofar couldBeRoot
                  let fitsInline = (avail >= neededForInline)
                  let wouldFitInlineOnNextPage = ((pageSize - PAGE_OVERHEAD) >= neededForInline)
                  let fitsOverflow = (avail >= neededForOverflow)
                  let flushThisPage = isLastChild || ((not fitsInline) && (wouldFitInlineOnNextPage || (not fitsOverflow))) 
                  let isRootNode = isLastChild && couldBeRoot
  
                  if flushThisPage then
                      let thisPageNumber = nextPageNumber
                      buildParentPage overflows children i first
                      if isRootNode then
                          pb.SetPageFlag(FLAG_ROOT_NODE)
                          // assert pb.Position <= (pageSize - 8)
                          pb.SetSecondToLastInt32(firstLeaf)
                          pb.SetLastInt32(lastLeaf)
                      else
  