             ctx.ports.push outport
             @getBracketContext('out', outport, ctx.ip.scope).push ctx
           forwardedOpens.reverse()
-          ips.unshift ip for ip in forwardedOpens
+          @addToResult result, outport, ip, true 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, false
          @getBracketContext('out', port, ipClone.scope, ipClone.index).pop()

    delete result.__bracketClosingBefore
    delete result.__bracketContext


  getBracketContext: (type, port, scope, idx) ->
    {name, index} = ports.normalizePortName port
    index = idx if idx?
    portsList = if type is 'in' then @inPorts else @outPorts
    if portsList[name].isAddressable()
      port = "#{name}[#{index}]"
    # Ensure we have a bracket context for the current scope
    @bracketContext[type][port] = {} unless @bracketContext[type][port]
    @bracketContext[type][port][scope] = [] unless @bracketContext[type][port][scope]
