Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision a73d57a0f560d4d17a58b395e9f01b5bdef94eed)
+++ src/GenPoly/Box.cc	(revision 30aeb27024b481c431df7c2de351ebfb5e2348e5)
@@ -637,5 +637,5 @@
 			assert( arg );
 			if ( isPolyType( realParam->get_type(), tyVars ) ) {
-				if ( dynamic_cast<TypeInstType *>(arg->get_type()) == NULL ) {
+				if ( ! isPolyType( arg->get_type() ) ) {
 					UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
 					deref->get_args().push_back( new CastExpr( new VariableExpr( param ), new PointerType( Type::Qualifiers(), arg->get_type()->clone() ) ) );
