     @error error if error
 
     isLast = =>
-      pos = @nodeInstance.outputQ.indexOf @result
-      len = @nodeInstance.outputQ.length
+      resultsOnly = @nodeInstance.outputQ.filter (q) ->
+        return true unless q.__resolved
+        if Object.keys(q).length is 2 and q.__bracketClosingAfter
+          return false
+        true
+      pos = resultsOnly.indexOf @result
+      len = resultsOnly.length
       load = @nodeInstance.load
       return true if pos is len - 1
       return true if pos is -1 and load is len + 1

      @addBracketForwards result
      for port, ips of result
        continue if port.indexOf('__') is 0
        continue unless @outPorts.ports[port].isAttached()
        for ip in ips
          if ip.type is 'openBracket'
            debug "#{@nodeId} sending < #{ip.data} to #{port}"
          else if ip.type is 'closeBracket'
            debug "#{@nodeId} sending > #{ip.data} to #{port}"
          else
            debug "#{@nodeId} sending DATA to #{port}"
          @outPorts[port].sendIP ip
      @outputQ.shift()


      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
