diff --git a/Yesod/Routes/TH/Dispatch.hs b/Yesod/Routes/TH/Dispatch.hs
--- a/Yesod/Routes/TH/Dispatch.hs
+++ b/Yesod/Routes/TH/Dispatch.hs
@@ -203,8 +203,11 @@
             Static _ -> return Nothing
             Dynamic _ -> Just <$> newName "x"
 
-    ys <- forM (catMaybes xs) $ \x -> do
-        y <- newName "y"
+    -- Note: the zipping with Ints is just a workaround for (apparently) a bug
+    -- in GHC where the identifiers are considered to be overlapping. Using
+    -- newName should avoid the problem, but it doesn't.
+    ys <- forM (zip (catMaybes xs) [1..]) $ \(x, i) -> do
+        y <- newName $ "y" ++ show (i :: Int)
         return (x, y)
 
     -- In case we have multi pieces at the end
diff --git a/yesod-routes.cabal b/yesod-routes.cabal
--- a/yesod-routes.cabal
+++ b/yesod-routes.cabal
@@ -1,5 +1,5 @@
 name:            yesod-routes
-version:         1.1.0.1
+version:         1.1.0.2
 license:         MIT
 license-file:    LICENSE
 author:          Michael Snoyman <michael@snoyman.com>
