CORD-1592: Fix wrong import of service models from core, such as in
A-CORD

Change-Id: I3770fae279cbaf6d7aa70487e5eb4abe73c92625
diff --git a/lib/xos-genx/xosgenx/targets/service.xtarget b/lib/xos-genx/xosgenx/targets/service.xtarget
index d3875d5..e70f0d6 100644
--- a/lib/xos-genx/xosgenx/targets/service.xtarget
+++ b/lib/xos-genx/xosgenx/targets/service.xtarget
@@ -13,13 +13,16 @@
 {% if file_exists(m.name|lower+'_top.py') -%}{{ include_file(m.name|lower+'_top.py') }} {% endif %}
 
 {%- for l in m.links -%}{% set peer_name=l.peer.name %}
+
 {% if peer_name not in proto.message_names -%}
 from core.models import {{ peer_name }} 
 {%- endif -%}
 {%- endfor -%}
 {%- for b in m.bases -%}
 {%- if b.name!='XOSBase' and 'Mixin' not in b.name %}
+{% if b.name not in proto.message_names %}
 from core.models import {{ b.name }}
+{% endif %}
 {%- endif -%}
 {% endfor %}