Index: src/libcschem/compile.c =================================================================== --- src/libcschem/compile.c (revision 10330) +++ src/libcschem/compile.c (revision 10331) @@ -424,13 +424,16 @@ } comp = csch_acomp_get(dst, name_glob); - if (comp == NULL) + if (comp == NULL) { comp = csch_acomp_new(dst, hpath->hlev, CSCH_ASCOPE_SHEET_LOCAL, name_glob, name_loc); - res = csch_compile_descend(dst, viewid, hpath, src, name_loc, child); + res = csch_compile_descend(dst, viewid, hpath, src, name_loc, child); - comp->child_sheet = child; - comp->hdr.omit = 1; + comp->child_sheet = child; + comp->hdr.omit = 1; + } + else + res = 0; /* Bind sheet ref sym terminals to child sheet terminals */ for(e = htip_first(&src->id2obj); e != NULL; e = htip_next(&src->id2obj, e)) {