Index: src/ResolvExpr/Unify.cc
===================================================================
--- src/ResolvExpr/Unify.cc	(revision 33b7d490d37c1f84e96a85cdf1c8baad2b08aeb8)
+++ src/ResolvExpr/Unify.cc	(revision 9d8124f79ccec28447cabfc84649853818e887f2)
@@ -943,5 +943,5 @@
 			// check that the other type is compatible and named the same
 			auto otherInst = dynamic_cast< const XInstType * >( other );
-			this->result = otherInst && inst->name == otherInst->name;
+			if (otherInst && inst->name == otherInst->name) this->result = otherInst;
 			return otherInst;
 		}
