Index: lib/Sema/SemaDecl.cpp
===================================================================
--- lib/Sema/SemaDecl.cpp	(revision 121485)
+++ lib/Sema/SemaDecl.cpp	(working copy)
@@ -3469,6 +3469,7 @@
     NewFD->setLexicalDeclContext(CurContext);
     // Filter out previous declarations that don't match the scope.
     FilterLookupForScope(*this, Previous, DC, S, NewFD->hasLinkage());
+    isExplicitSpecialization = false;
   } else {
     isFriend = D.getDeclSpec().isFriendSpecified();
     isVirtual = D.getDeclSpec().isVirtualSpecified();
