   dump: (offset, snapshot) ->
     end = offset.traverse(@extent)
     @ids.forEach (id) ->
-      if snapshot[id]?
-        snapshot[id].end = end
-      else
-        snapshot[id] = Range(offset, end)
+      snapshot[id].start ?= offset
+      snapshot[id].end = end
     end
 
   findContaining: (point, set) ->

Range = require "./range"
{addSet, subtractSet, intersectSet, setEqual} = require "./set-helpers"

BRANCHING_THRESHOLD = 3

class Node


  insert: (id, start, end) ->
    assertValidId(id)
    @rangeCache[id] = Range(start, end)
    if splitNodes = @rootNode.insert(new Set().add(id + ""), start, end)
      @rootNode = new Node(splitNodes)

  delete: (id) ->
    assertValidId(id)
    delete @rangeCache[id]
    @rootNode.delete(id)
    @condenseIfNeeded()

  splice: (position, oldExtent, newExtent) ->
    @clearRangeCache()
    if splitNodes = @rootNode.splice(position, oldExtent, newExtent, @exclusiveIds, new Set)
      @rootNode = new Node(splitNodes)
    @condenseIfNeeded()
