diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,20 @@
 
 The format is based on [Keep a Changelog](http://keepachangelog.com/).
 
+## [0.6.4] - 2017-04-09
+
+### Fixed
+
+* Fixed handling of repeated antiquotation variables, which in some
+  cases was causing a compilation error.
+
+## [0.6.3] - 2017-03-12
+
+### Fixed
+
+* Setting the `CLASSPATH` using Gradle is now fully supported. It was
+  previously unusable due to a bug (see #42).
+
 ## [0.6.2] - 2017-02-21
 
 * Avoid producing warnings about unused inlinejava_bytecode0 bindings.
diff --git a/inline-java.cabal b/inline-java.cabal
--- a/inline-java.cabal
+++ b/inline-java.cabal
@@ -1,5 +1,5 @@
 name:                inline-java
-version:             0.6.3
+version:             0.6.4
 synopsis:            Java interop via inline Java code in Haskell modules.
 description:         Please see README.md.
 homepage:            http://github.com/tweag/inline-java#readme
diff --git a/src/Language/Java/Inline.hs b/src/Language/Java/Inline.hs
--- a/src/Language/Java/Inline.hs
+++ b/src/Language/Java/Inline.hs
@@ -53,7 +53,7 @@
 import qualified Data.ByteString.Char8 as BS
 import Data.Char (isAlphaNum)
 import Data.Generics (everything, mkQ)
-import Data.List (intercalate, isPrefixOf, isSuffixOf)
+import Data.List (intercalate, isPrefixOf, isSuffixOf, nub)
 import Data.Maybe (fromJust)
 import Data.Singletons (SomeSing(..))
 import Data.String (fromString)
@@ -132,7 +132,7 @@
     }
 
 antis :: Java.Block -> [String]
-antis = everything (++) (mkQ [] (\case Java.Name (Java.Ident ('$':av):_) -> [av]; _ -> []))
+antis = nub . everything (++) (mkQ [] (\case Java.Name (Java.Ident ('$':av):_) -> [av]; _ -> []))
 
 toJavaType :: Sing (a :: JType) -> Java.Type
 toJavaType ty = case Java.parser Java.ttype (pretty ty) of
diff --git a/tests/Language/Java/InlineSpec.hs b/tests/Language/Java/InlineSpec.hs
--- a/tests/Language/Java/InlineSpec.hs
+++ b/tests/Language/Java/InlineSpec.hs
@@ -40,6 +40,10 @@
             bar = 2 :: Int32
         ([java| $foo + $bar |] >>= reify) `shouldReturn` (3 :: Int32)
 
+      it "Supports repeated antiquotation variables" $ do
+        obj :: JObject <- [java| new Object() {} |]
+        ([java| $obj.equals($obj) |] >>= reify) `shouldReturn` True
+
       it "Supports antiquotation variables in blocks" $ do
         let z = 1 :: Int32
         ([java| { return $z + 1; } |] >>= reify) `shouldReturn` (2 :: Int32)
