Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 77971f6131006ff573ba5422c4d83b41b7c5e612)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 141b7868c72c7947affae41e61e4bfcd7f9c6652)
@@ -39,4 +39,5 @@
 #include "SymTab/Validate.h"
 #include "Tuples/Tuples.h"
+#include "Tuples/Explode.h"
 #include "Common/utility.h"
 #include "InitTweak/InitTweak.h"
@@ -240,4 +241,12 @@
 				} // if
 			} // if
+		} else if ( NameExpr * nameExpr = dynamic_cast< NameExpr * >( member ) ) {
+			// xxx - temporary hack until 0/1 are int constants
+			if ( nameExpr->get_name() == "0" || nameExpr->get_name() == "1" ) {
+				std::stringstream ss( nameExpr->get_name() );
+				int val;
+				ss >> val;
+				alternatives.push_back( Alternative( new TupleIndexExpr( expr->clone(), val ), env, newCost ) );
+			}
 		} // if
 	}
@@ -1057,21 +1066,10 @@
 
 	void AlternativeFinder::visit( UniqueExpr *unqExpr ) {
-		// this won't work because the unqExprs wont share an expression anymore...
 		AlternativeFinder finder( indexer, env );
 		finder.findWithAdjustment( unqExpr->get_expr() );
 		for ( Alternative & alt : finder.alternatives ) {
-			// xxx - attach a resolved ConstructorInit node?
-			// xxx - is it possible to make the objDecl's type const?
-			static UniqueName tempNamer( "_unq_expr_" );
-			ObjectDecl * objDecl = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::Cforall, nullptr, alt.expr->get_result()->clone(), nullptr );
-			// must be done on two lines because genCtorInit accesses objDecl's fields
-			objDecl->set_init( InitTweak::genCtorInit( objDecl ) );
-
+			// ensure that the id is passed on to the UniqueExpr alternative so that the expressions are "linked"
 			UniqueExpr * newUnqExpr = new UniqueExpr( alt.expr->clone(), unqExpr->get_id() );
-			newUnqExpr->set_object( objDecl );
-
-			resolveObject( indexer, objDecl );
-
-			alternatives.push_back( Alternative( newUnqExpr, env, Cost::zero ) );
+			alternatives.push_back( Alternative( newUnqExpr, alt.env, alt.cost ) );
 		}
 	}
