anchor.diff:                      pb.PutInt32 (prevPageNumber) // prev page num.
                       pb.PutInt16 (0) // number of pairs in this page. zero for now. written at end.
                       // assert pb.Position is 8 (LEAF_PAGE_OVERHEAD - sizeof(lastInt32))
  +
                   (*
                    * one of the following cases must now be true:
                    * 
  
positive.code:                  * already done it above.
                   * 
                   *)
                  let available = pb.Available - sizeof<int32> // for the lastInt32
                  if (available >= neededForBothInline) then
                      putKeyWithLength k
  
negative.code:                 let v = csr.Value()
                  // assert k <> null
                  // but v might be null (a tombstone)
  
                  let vlen = if v<>null then v.Length else int64 0
  
                  let neededForOverflowPageNumber = sizeof<int32>
  
                  let neededForKeyBase = 1 + Varint.SpaceNeededFor(int64 k.Length)
                  let neededForKeyInline = neededForKeyBase + k.Length
  
                  let neededForValueInline = 1 + if v<>null then Varint.SpaceNeededFor(int64 vlen) + int vlen else 0
                  let neededForValueOverflow = 1 + if v<>null then Varint.SpaceNeededFor(int64 vlen) + neededForOverflowPageNumber else 0
  
                  let neededForBothInline = neededForKeyInline + neededForValueInline
                  let neededForKeyInlineValueOverflow = neededForKeyInline + neededForValueOverflow
  
                  csr.Next()
  
                  if pb.Position > 0 then
                      // determine if we need to flush this page
                      let spaceLeft = pb.Available - sizeof<int32> // for the lastInt32
                      let fitBothInline = (spaceLeft >= neededForBothInline)
                      let wouldFitBothInlineOnNextPage = ((pageSize - LEAF_PAGE_OVERHEAD) >= neededForBothInline)
                      let fitKeyInlineValueOverflow = (spaceLeft >= neededForKeyInlineValueOverflow)
                      let neededForKeyOverflow = neededForKeyBase + neededForOverflowPageNumber
                      let neededForBothOverflow = neededForKeyOverflow + neededForValueOverflow
                      let fitBothOverflow = (spaceLeft >= neededForBothOverflow)
                      let flushThisPage = (not fitBothInline) && (wouldFitBothInlineOnNextPage || ( (not fitKeyInlineValueOverflow) && (not fitBothOverflow) ) )
  
                      if flushThisPage then
  