       for port, contexts of @nodeInstance.bracketContext
         continue unless contexts[@scope]
         nodeContext = contexts[@scope]
+        continue unless nodeContext.length
         context = nodeContext[nodeContext.length - 1]
         buf = @nodeInstance.inPorts[context.source].getBuffer context.ip.scope
         loop

        return unless context.length
        for outport, ips of result
          continue if outport.indexOf('__') is 0
          unforwarded = context.filter (ctx) =>
            return false unless @isForwardingOutport inport, outport
            ctx.ports.indexOf(outport) is -1

      do @processOutputQueue
    return

  addToResult: (result, port, ip, before = false) ->
    if port.indexOf('[') is -1
      # Regular port
      outport = port
    else
      [port, outport, idx] = port.match /(.*)\[([0-9+])\]/
    method = if before then 'unshift' else 'push'
    if @outPorts[outport].isAddressable()
      idx = if idx then parseInt(idx) else ip.index
      result[outport] = {} unless result[outport]
      result[outport][idx] = [] unless result[outport][idx]
      ip.index = idx
      result[outport][idx][method] ip
      return
    result[outport] = [] unless result[outport]
    result[outport][method] ip

  addBracketForwards: (result) ->
    if result.__bracketClosingBefore?.length
      for context in result.__bracketClosingBefore
        debug "#{@nodeId} closeBracket-A #{context.closeIp.data} #{context.ports}"
        continue unless context.ports.length
        for port in context.ports
          ipClone = context.closeIp.clone()
          @addToResult result, port, ipClone, true

    if result.__bracketContext
      # First see if there are any brackets to forward. We need to reverse
