Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
+++ src/GenPoly/Box.cc	(revision 0a81c3fa5fe8fdf6e54bc612620b22c7c9342e8d)
@@ -758,5 +758,6 @@
 					// if the argument's type is polymorphic, we don't need to box again!
 					return;
-				} else if ( arg->get_result()->get_lvalue() ) {
+				} else if ( arg->get_result()->get_lvalue() ) {  // xxx - is this still right??
+				// xxx - dynamic_cast<ReferenceType *>( arg->get_result() )??
 					// VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
 					// xxx - need to test that this code is still reachable
@@ -1036,5 +1037,6 @@
 						assert( appExpr->has_result() );
 						assert( ! appExpr->get_args().empty() );
-						if ( isPolyType( appExpr->get_result(), scopeTyVars, env ) ) {
+						if ( isPolyPtr( appExpr->get_result(), scopeTyVars, env ) ) { // dereference returns a reference type
+							// remove dereference from polymorphic types since they are boxed.
 							Expression *ret = appExpr->get_args().front();
 							delete ret->get_result();
