diff --git a/tests/regressiontests/aggregation_regress/tests.py b/tests/regressiontests/aggregation_regress/tests.py
index ec2603f..d62e13e 100644
--- a/tests/regressiontests/aggregation_regress/tests.py
+++ b/tests/regressiontests/aggregation_regress/tests.py
@@ -725,6 +725,23 @@ class AggregationTests(TestCase):
             attrgetter("name")
         )
 
+    def test_double_annotation_filter(self):
+        qs = Book.objects.values("name").annotate(
+            n_authors=Count("authors")
+        ).filter(
+            authors__name__startswith="Adrian"
+        ).annotate(
+            n_authors2=Count("authors")
+        )
+#        import ipdb
+#        ipdb.set_trace()
+        self.assertQuerysetEqual(
+            qs, [
+                ("The Definitive Guide to Django: Web Development Done Right", 2, 1)
+            ],
+            lambda b: (b["name"], b["n_authors"], b["n_authors2"])
+        )
+
     @skipUnlessDBFeature('supports_stddev')
     def test_stddev(self):
         self.assertEqual(
