diff --git a/Data/Generics/SYB/WithClass/Derive.hs b/Data/Generics/SYB/WithClass/Derive.hs
--- a/Data/Generics/SYB/WithClass/Derive.hs
+++ b/Data/Generics/SYB/WithClass/Derive.hs
@@ -176,13 +176,15 @@
      ])
  where notTyVar (VarT _) = False
        notTyVar _        = True
+       applied (AppT f _) = applied f
+       applied x = x
        types = [ t | (_, _, _, ts) <- cons, t <- ts, notTyVar t ]
 
        myType = foldl AppT (ConT name) typeParams
        dataCxt typ = conT ''Data `appT` varT (mkName "ctx") `appT` return typ
        dataCxt' typ = return $ ClassP ''Data [VarT (mkName "ctx"), typ]
        satCxt typ = return $ ClassP ''Sat [VarT (mkName "ctx") `AppT` typ]
-       dataCxtTypes = nub (typeParams ++ types)
+       dataCxtTypes = filter (\x -> applied x /= ConT name) $ nub (typeParams ++ types)
        satCxtTypes = nub (myType : types)
        context = cxt (map dataCxt' dataCxtTypes ++ map satCxt satCxtTypes)
 #endif
diff --git a/syb-with-class.cabal b/syb-with-class.cabal
--- a/syb-with-class.cabal
+++ b/syb-with-class.cabal
@@ -1,5 +1,5 @@
 Name:               syb-with-class
-Version:            0.6.1.3
+Version:            0.6.1.4
 License:            BSD3
 License-file:       LICENSE
 Copyright:          2004 - 2008 The University of Glasgow, CWI,
@@ -25,7 +25,7 @@
   location: http://patch-tag.com/r/Saizan/syb-with-class/
 
 Library 
-    Build-Depends:      base >= 3 && < 5, template-haskell >= 2.4 && < 2.8, bytestring, array, containers
+    Build-Depends:      base >= 3 && < 5, template-haskell >= 2.4 && < 2.9, bytestring, array, containers
     Exposed-modules:
         Data.Generics.SYB.WithClass.Basics
         Data.Generics.SYB.WithClass.Context
