       @outputQ.push result
       do @processOutputQueue
     return
+
+  getBracketContext: (port, scope, idx) ->
+    portname = port
+    if @inPorts[port].isAddressable()
+      portname = "#{port}[#{idx}]"
+    # Ensure we have a bracket context for the current scope
+    @bracketContext[portname] = {} unless @bracketContext[portname]
+    @bracketContext[portname][scope] = [] unless @bracketContext[portname][scope]
+    return @bracketContext[portname][scope]
 
   addToResult: (result, port, ip, before = false) ->
     if port.indexOf('[') is -1

          return unless buf[0] is ip
          # Remove from buffer
          port.get ip.scope
          context = @bracketContext[port.name][ip.scope].pop()
          context.closeIp = ip
          debug "#{@nodeId} closeBracket-C #{ip.data} #{context.ports}"
          result =

    if args.length is 1 then res[0] else res

  __getForForwarding: (port) ->
    prefix = []
    dataIp = null
    # Read IPs until we hit data
