Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 76fe046c5d7501192d849b5595c9079478c38b0b)
+++ src/ResolvExpr/CommonType.cc	(revision 06601401c36e6b2cf39fa38d23552cf5418850f3)
@@ -681,7 +681,10 @@
 
 	void postvisit( const ast::EnumPosType * enumPos ) {
-		if ( dynamic_cast<const ast::EnumPosType *>(type2) ) {
+		if ( auto type2AsPos = dynamic_cast<const ast::EnumPosType *>(type2) ) {
 			// result = commonType( type2AsPos->instance, enumPos->instance, tenv, need, have, open, widen );
-			result = enumPos;
+			// result = enumPos;
+			if ( enumPos->instance->base->name == type2AsPos->instance->base->name ) {
+				result = type2;
+			}
 		} else if ( dynamic_cast<const ast::BasicType *>(type2) ) {
 			result = type2;
Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 76fe046c5d7501192d849b5595c9079478c38b0b)
+++ src/ResolvExpr/Unify.cc	(revision 06601401c36e6b2cf39fa38d23552cf5418850f3)
@@ -517,8 +517,11 @@
 		}
 
-		void postvisit( const ast::EnumPosType * ) {
+		void postvisit( const ast::EnumPosType * posType ) {
 			// Lazy approach for now
 			auto otherPos = dynamic_cast< const ast::EnumPosType *>(type2);
-			if (otherPos) this->result = otherPos;
+			if ( otherPos ) {
+				if ( otherPos->instance->base->name == posType->instance->base->name )
+					result = otherPos;
+			}
 		}
 
