         for port in context.ports
           ipClone = context.closeIp.clone()
           @addToResult result, port, ipClone, false
-          @getBracketContext('out', port, ipClone.scope, ipClone.index).pop()
+          @getBracketContext('out', port, ipClone.scope).pop()
 
     delete result.__bracketClosingBefore
     delete result.__bracketContext

            ctx.ports.push outport
            @getBracketContext('out', outport, ctx.ip.scope).push ctx
          forwardedOpens.reverse()
          ips.unshift ip for ip in forwardedOpens

    if result.__bracketClosingAfter?.length
      for context in result.__bracketClosingAfter

        for port in context.ports
          ipClone = context.closeIp.clone()
          @addToResult result, port, ipClone, true
          @getBracketContext('out', port, ipClone.scope).pop()

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