Index: django/db/models/sql/query.py
===================================================================
--- django/db/models/sql/query.py	(revision 10674)
+++ django/db/models/sql/query.py	(working copy)
@@ -502,8 +502,10 @@
             if not rhs.alias_refcount[alias]:
                 # An unused alias.
                 continue
+            lhs_alias = rhs.alias_map[alias][LHS_ALIAS]
+            connection = (change_map.get(lhs_alias, lhs_alias),) + rhs.rev_join_map[alias][1:]
             promote = (rhs.alias_map[alias][JOIN_TYPE] == self.LOUTER)
-            new_alias = self.join(rhs.rev_join_map[alias],
+            new_alias = self.join(connection,
                     (conjunction and not first), used, promote, not conjunction)
             used.add(new_alias)
             change_map[alias] = new_alias
Index: tests/regressiontests/queries/tests.py
===================================================================
--- tests/regressiontests/queries/tests.py	(revision 10674)
+++ tests/regressiontests/queries/tests.py	(working copy)
@@ -1,6 +1,9 @@
 import unittest
-from models import Tag, Annotation
+from models import Tag, Annotation, Recommendation, Recommender
+from django.db.models.query import QuerySet, Q
 from django.db.models import Count
+import operator
+from django import test
 
 class QuerysetOrderedTests(unittest.TestCase):
     """
@@ -24,4 +27,27 @@
         qs = Annotation.objects.annotate(num_notes=Count('notes'))
         self.assertEqual(qs.ordered, False)
         self.assertEqual(qs.order_by('num_notes').ordered, True)
-        
\ No newline at end of file
+
+class QuerysetMergingTests(test.TestCase):
+    """
+    Tests for merging Querysets that have been filtered on multiple elements from the same
+    base class
+    """
+    
+    fixtures = ['multiple_child_classes']
+    
+    def test_merging_models_with_same_parent(self):
+        match = Recommendation.objects.get(recommender__titletranslation__text__icontains='ar')
+
+        qs = Recommendation._default_manager.get_query_set()
+        
+        search_fields = [
+            'titletranslation__text__icontains',
+            'recommender__titletranslation__text__icontains'
+        ]
+        
+        or_queries = [Q(**{field: u'ar'}) for field in search_fields]
+        
+        other_qs = QuerySet(Recommendation)
+        other_qs = other_qs.filter(reduce(operator.or_, or_queries))
+        self.assert_(match in qs & other_qs)
\ No newline at end of file
Index: tests/regressiontests/queries/fixtures/multiple_child_classes.json
===================================================================
--- tests/regressiontests/queries/fixtures/multiple_child_classes.json	(revision 0)
+++ tests/regressiontests/queries/fixtures/multiple_child_classes.json	(revision 0)
@@ -0,0 +1 @@
+[{"pk": 1, "model": "queries.title", "fields": {}}, {"pk": 2, "model": "queries.title", "fields": {}}, {"pk": 3, "model": "queries.title", "fields": {}}, {"pk": 4, "model": "queries.title", "fields": {}}, {"pk": 1, "model": "queries.titletranslation", "fields": {"text": "Bar", "title": 1}}, {"pk": 2, "model": "queries.titletranslation", "fields": {"text": "Foo", "title": 2}}, {"pk": 3, "model": "queries.titletranslation", "fields": {"text": "Few", "title": 3}}, {"pk": 4, "model": "queries.titletranslation", "fields": {"text": "Bas", "title": 4}}, {"pk": 1, "model": "queries.recommender", "fields": {}}, {"pk": 4, "model": "queries.recommender", "fields": {}}, {"pk": 2, "model": "queries.recommendation", "fields": {"recommender": 1}}, {"pk": 3, "model": "queries.recommendation", "fields": {"recommender": 4}}]
Index: tests/regressiontests/queries/models.py
===================================================================
--- tests/regressiontests/queries/models.py	(revision 10674)
+++ tests/regressiontests/queries/models.py	(working copy)
@@ -271,7 +271,21 @@
     def __unicode__(self):
         return self.name
 
+# a base class for Recommender and Recommendation
+class Title(models.Model):
+    pass
 
+class TitleTranslation(models.Model):
+    title = models.ForeignKey(Title)
+    text = models.CharField(max_length=100)
+
+class Recommender(Title):
+    pass 
+
+class Recommendation(Title):
+    recommender = models.ForeignKey(Recommender)
+
+
 __test__ = {'API_TESTS':"""
 >>> generic = NamedCategory.objects.create(name="Generic")
 >>> t1 = Tag.objects.create(name='t1', category=generic)
