handle opaque structs better
diff --git a/src/cmd/acidtypes/type.c b/src/cmd/acidtypes/type.c
index 56dc33e..309629d 100644
--- a/src/cmd/acidtypes/type.c
+++ b/src/cmd/acidtypes/type.c
@@ -315,6 +315,8 @@
 	return strcmp(a, b);
 }
 
+int careaboutaggrcount;
+
 static int
 typecmp(Type *t, Type *u)
 {
@@ -343,7 +345,7 @@
 	if(i)
 		return i;
 
-	if(t->ty == Aggr){
+	if(careaboutaggrcount && t->ty == Aggr){
 		if(t->n > u->n)
 			return -1;
 		if(t->n < u->n)
@@ -547,7 +549,9 @@
 	for(tl=alltypes; tl; tl=tl->tl)
 		all[n++] = tl->hd;
 
+	careaboutaggrcount = 1;
 	qsort(all, n, sizeof(all[0]), qtypecmp);
+	careaboutaggrcount = 0;
 
 	nn = 0;
 	for(i=0; i<n; i++){