     spawn = (event) ->
       child = makeObservable(f event.value())
       extraDeps.push(child)
+      UpdateBarrier.flushDepCache()
       composite.add (unsubAll, unsubMe) -> child.subscribeInternal (event) ->
         if event.isEnd()
           _.remove(child, extraDeps)
+          UpdateBarrier.flushDepCache()
           checkQueue()
           checkEnd(unsubMe)
           Bacon.noMore


  hasWaiters = -> waiters.length > 0

  { whenDoneWith, hasWaiters, inTransaction, currentEventId, wrappedSubscribe }
)()

Bacon.EventStream = EventStream

        while (afters.length)
          f = afters.splice(0, 1)[0]
          f()
        flatDeps = {}
      result

  currentEventId = -> if rootEvent then rootEvent.id else undefined
