django/django — pull request #3323 by akaariai (2014-10-07 13:06:02+00:00)
Title: Fixed #23605 -- added relabeled_clone() method to sql.Query

The problem manifested itself in rare cases where at least double nested
subquery's filter condition might target non-existing alias.

Thanks to Trac alias ris for reporting the problem.