       else
         @forwardBrackets[inPort] = tmp
         @bracketCounter[inPort] = 0
+    tmp = []
+    for outPort in @dropEmptyBrackets
+      tmp.push outPort if outPort of @outPorts.ports
+    @dropEmptyBrackets = tmp
 
   # Sets process handler function
   process: (handle) ->

    (ip.type is 'openBracket' or ip.type is 'closeBracket')
      # Bracket forwarding
      outputEntry =
        __resolved: ip.type is 'closeBracket'
        __forwarded: true
        __type: ip.type
        __scope: ip.scope

        outputEntry[outPort].push ip
      port.buffer.pop()
      # Drop empty brackets if needed
      if ip.type is 'closeBracket' and @dropEmptyBrackets.length
        haveData = []
        for i in [@outputQ.length - 1..0]
          entry = @outputQ[i]
