CORD-1427: Support packaging and separate namespaces for models

Change-Id: I541524f61f1a12244f4cced738c0d1fac1359a2f
diff --git a/xos/genx/targets/xproto.xtarget b/xos/genx/targets/xproto.xtarget
index 843d741..513d7a7 100644
--- a/xos/genx/targets/xproto.xtarget
+++ b/xos/genx/targets/xproto.xtarget
@@ -10,9 +10,9 @@
   {% endif %}
   {%- endfor %}
   
-  {%- for l in m.links %}
+  {%- for l in m.links %}{% set peer_name=l.peer.name %}
   {{ l }}
-  {{ l.modifier }} {{ l.link_type }} {{ l.name }} -> {{ l.peer }}:{{ l.dst_port }} = 1 {% if l.options %} [{% for k,v in l.options.iteritems() %} {{ k }} = {{ v }}{% if not loop.last %},{% endif %} {% endfor %}]{% endif %};
+  {{ l.modifier }} {{ l.link_type }} {{ l.name }} -> {{ l.peer.name }}:{{ l.dst_port }} = 1 {% if l.options %} [{% for k,v in l.options.iteritems() %} {{ k }} = {{ v }}{% if not loop.last %},{% endif %} {% endfor %}]{% endif %};
   {%- endfor -%}
 }
 {% endfor %}