Index: src/Concurrency/WaitforNew.cpp
===================================================================
--- src/Concurrency/WaitforNew.cpp	(revision c6b4432f5c6c6679b981f5a6bded51ad30ac00d9)
+++ src/Concurrency/WaitforNew.cpp	(revision 45a091b00fd95491b28961bb07e3975caedbe601)
@@ -450,6 +450,5 @@
 	);
 
-	// For some reason, enumerate doesn't work here because of references.
-	for ( size_t i = 0 ; i < waitfor->clauses.size() ; ++i ) {
+	for ( const auto & [i, clause] : enumerate( waitfor->clauses ) ) {
 		theSwitch->cases.push_back(
 			new ast::CaseClause( location,
@@ -457,5 +456,5 @@
 				{
 					new ast::CompoundStmt( location, {
-						waitfor->clauses[i]->stmt,
+						clause->stmt,
 						new ast::BranchStmt( location,
 							ast::BranchStmt::Break,
@@ -538,7 +537,6 @@
 	ast::Stmt       * setter      = makeSetter( location, flag );
 
-	// For some reason, enumerate doesn't work here because of references.
-	for ( size_t i = 0 ; i < stmt->clauses.size() ; ++i ) {
-		init_clause( comp, acceptables, i, stmt->clauses[i], setter );
+	for ( const auto & [i, clause] : enumerate( stmt->clauses ) ) {
+		init_clause( comp, acceptables, i, clause, setter );
 	}
 
