diff --git a/OpenId2/Discovery.hs b/OpenId2/Discovery.hs
--- a/OpenId2/Discovery.hs
+++ b/OpenId2/Discovery.hs
@@ -70,13 +70,15 @@
     let uri = fromMaybe (identifier ident) mb_loc
     req <- parseUrl uri
     res <- httpLbs req
-    let mloc = lookup "x-xrds-location"
+    let mloc = fmap S8.unpack
+             $ lookup "x-xrds-location"
              $ map (first $ map toLower . S8.unpack)
              $ responseHeaders res
+    let mloc' = if mloc == mb_loc then Nothing else mloc
     case statusCode res of
         200 ->
-          case mloc of
-            Just loc -> discoverYADIS ident (Just $ S8.unpack loc)
+          case mloc' of
+            Just loc -> discoverYADIS ident (Just loc)
             Nothing  -> do
               let mdoc = parseXRDS $ BSLU.toString $ responseBody res
               case mdoc of
diff --git a/authenticate.cabal b/authenticate.cabal
--- a/authenticate.cabal
+++ b/authenticate.cabal
@@ -1,5 +1,5 @@
 name:            authenticate
-version:         0.6.6
+version:         0.6.6.1
 license:         BSD3
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
