       Range(start, @getEnd(id))
 
   getStart: (id) ->
-    if entry = @rangeCache[id]
-      entry.start ?= @rootNode.getStart(id)
+    return unless @rootNode.ids.has(id)
+
+    entry = @rangeCache[id] ?= templateRange()
+    entry.start ?= @rootNode.getStart(id)
 
   getEnd: (id) ->
-    if entry = @rangeCache[id]
-      entry.end ?= @rootNode.getEnd(id)
+    return unless @rootNode.ids.has(id)
+
+    entry = @rangeCache[id] ?= templateRange()
+    entry.end ?= @rootNode.getEnd(id)
 
   findContaining: (start, end) ->
     containing = new Set


  dump: ->
    unless @rangeCacheFresh
      @rootNode.dump(Point.ZERO, @rangeCache)
      @rangeCacheFresh = true
    @rangeCache


  clearRangeCache: ->
    @rangeCache = {}
    @rangeCacheFresh = false

  condenseIfNeeded: ->
