Index: src/Virtual/ExpandCasts.cc
===================================================================
--- src/Virtual/ExpandCasts.cc	(revision c36814a10414e8846cf2d03be08ada58aafc93a7)
+++ src/Virtual/ExpandCasts.cc	(revision 63be33872128e89a0dc1fe9bdb8448d00934a453)
@@ -295,6 +295,5 @@
 	// returns the previous declaration for error messages.
 	ast::ObjectDecl const * insert( ast::ObjectDecl const * typeIdDecl ) {
-		std::string const & mangledName =
-				Mangle::mangle( typeIdDecl->type, Mangle::typeMode() );
+		std::string mangledName = Mangle::mangleType( typeIdDecl->type );
 		ast::ObjectDecl const *& value = instances[ mangledName ];
 		if ( value ) {
@@ -310,6 +309,5 @@
 
 	ast::ObjectDecl const * lookup( ast::Type const * typeIdType ) {
-		std::string const & mangledName =
-				Mangle::mangle( typeIdType, Mangle::typeMode() );
+		std::string mangledName = Mangle::mangleType( typeIdType );
 		auto const it = instances.find( mangledName );
 		return ( instances.end() == it ) ? nullptr : it->second;
