diff --git a/compiler2/Type_codegen.cc b/compiler2/Type_codegen.cc
index 7c2381d02fa6cb2740c5c6566f596615b3225c29..951f0208d7c8df92984834874be8038354b17a11 100644
--- a/compiler2/Type_codegen.cc
+++ b/compiler2/Type_codegen.cc
@@ -635,7 +635,8 @@ void Type::generate_code_xerdescriptor(output_struct* target)
   size_t last_len = 2 + last_s.size();    // 2 for > \n
   size_t bxer_len = 2 + bxer_name.size(); // 2 for > \n
   
-  if ((T_SEQOF == last->typetype || T_SETOF == last->typetype)) {
+  if ((T_SEQOF == last->typetype || T_SETOF == last->typetype) &&
+      last->get_ofType()->has_encoding(CT_XER)) {
     oftype_descr_name = mprintf("&%s_xer_", last->u.seof.ofType->get_genname_typedescriptor(my_scope).c_str());
   }