Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 02af22deb3e4b582e3cd77b96b228eec700fa5b6)
+++ src/GenPoly/Lvalue.cc	(revision baba5d886358df2b646d535ffff7050e2be25641)
@@ -111,8 +111,8 @@
 				Expression *expr = appExpr;
 				Type *appType = appExpr->get_results().front();
-				/*if ( isPolyType( funType ) ) {
+				if ( isPolyType( funType ) && ! isPolyType( appType ) ) {
 					// make sure cast for polymorphic type is inside dereference
 					expr = new CastExpr( appExpr, new PointerType( Type::Qualifiers(), appType->clone() ) );
-				}*/
+				}
 				UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
 				deref->get_results().push_back( appType->clone() );
