anchor.diff:  
               // this is the body of writeLeaves
               let source = seq { csr.First(); while csr.IsValid() do yield (csr.Key(), csr.Value()); csr.Next(); done }
  -            let initialState = {keys=[];leaves=[];nextPage=leavesFirstPage;boundaryPage=leavesBoundaryPage}
  +            let initialState = {firstLeaf=0;keys=[];leaves=[];nextPage=leavesFirstPage;boundaryPage=leavesBoundaryPage}
               let middleState = Seq.fold folder initialState source
               let finalState = 
                   if middleState.keys.Length > 0 then
  
positive.code:             let flushLeaf st isRootPage = 
                  pb.PutInt16At (OFFSET_COUNT_PAIRS, st.keys.Length)
                  let thisPageNumber = st.nextPage
                  let (nextN,nextB) = 
                      if (not isRootPage) && (thisPageNumber = st.boundaryPage) then
                          pb.SetPageFlag FLAG_BOUNDARY_NODE
                          let newRange = pageManager.GetRange(token)
                          // assert pb.Position <= (pageSize - 4)
                          pb.SetLastInt32(fst newRange)
                          newRange
                      else
  
negative.code:                 pb.Flush(fs)
                  pb.Reset()
                  if nextN <> (thisPageNumber+1) then utils.SeekPage(fs, pageSize, nextN)
                  {keys=[]; firstLeaf=firstLeaf; nextPage=nextN; boundaryPage=nextB; leaves=(thisPageNumber,List.head st.keys)::st.leaves}
  
              let folder st (pair:(byte[]*Stream)) = 
                  let (k,v) = pair
  