diff --git a/lib/Sema/SemaLambda.cpp b/lib/Sema/SemaLambda.cpp
index f97b523..0ce1c74 100644
--- a/lib/Sema/SemaLambda.cpp
+++ b/lib/Sema/SemaLambda.cpp
@@ -521,19 +521,21 @@
   // C++11 [expr.prim.lambda]p2:
   //   A lambda-expression shall not appear in an unevaluated operand
   //   (Clause 5).
-  switch (ExprEvalContexts.back().Context) {
-  case Unevaluated:
-    // We don't actually diagnose this case immediately, because we
-    // could be within a context where we might find out later that
-    // the expression is potentially evaluated (e.g., for typeid).
-    ExprEvalContexts.back().Lambdas.push_back(Lambda);
-    break;
+  if (!CurContext->isDependentContext()) {
+    switch (ExprEvalContexts.back().Context) {
+    case Unevaluated:
+      // We don't actually diagnose this case immediately, because we
+      // could be within a context where we might find out later that
+      // the expression is potentially evaluated (e.g., for typeid).
+      ExprEvalContexts.back().Lambdas.push_back(Lambda);
+      break;
 
-  case ConstantEvaluated:
-  case PotentiallyEvaluated:
-  case PotentiallyEvaluatedIfUsed:
-    break;
+    case ConstantEvaluated:
+    case PotentiallyEvaluated:
+    case PotentiallyEvaluatedIfUsed:
+      break;
+    }
   }
-
+  
   return MaybeBindToTemporary(Lambda);
 }
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index ba6ec82..a63b9c8 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -7672,6 +7672,13 @@
                                       E->getCallOperator()->getLocEnd());
   getDerived().transformAttrs(E->getCallOperator(), CallOperator);
   
+  // FIXME: Instantiation-specific.
+  CallOperator->setInstantiationOfMemberFunction(E->getCallOperator(), 
+                                                 TSK_ImplicitInstantiation);
+
+  // Introduce the context of the call operator.
+  Sema::ContextRAII SavedContext(getSema(), CallOperator);
+
   // Enter the scope of the lambda.
   sema::LambdaScopeInfo *LSI
     = getSema().enterLambdaScope(CallOperator, E->getIntroducerRange(),
@@ -7741,17 +7748,12 @@
   }
 
   // Instantiate the body of the lambda expression.
-  StmtResult Body;
-  {
-    Sema::ContextRAII SavedContext(getSema(), CallOperator);
-    
-    Body = getDerived().TransformStmt(E->getBody());
-    if (Body.isInvalid()) {
-      getSema().ActOnLambdaError(E->getLocStart(), /*CurScope=*/0, 
-                                 /*IsInstantiation=*/true);
-      return ExprError();    
-    }
-  } 
+  StmtResult Body = getDerived().TransformStmt(E->getBody());
+  if (Body.isInvalid()) {
+    getSema().ActOnLambdaError(E->getLocStart(), /*CurScope=*/0, 
+                               /*IsInstantiation=*/true);
+    return ExprError();    
+  }
   
   return getSema().ActOnLambdaExpr(E->getLocStart(), Body.take(), 
                                    /*CurScope=*/0, 
