Avoid an O(n**2) operation where O(n) will suffice.  Possibly worth a second or two when running the test suite.
Avoid an O(n**2) operation where O(n) will suffice.  Possibly worth a second or two when running the test suite.

git-svn-id: 4f9f921b081c523744c7bf24d959a0db39629563@14433 bcc190cf-cafb-0310-a4f2-bffc1f526a37

skevy/django,skevy/django,Instagram/django,Instagram/django,mitsuhiko/django,jamespacileo/django-france,disqus/django-old,django-nonrel/django-nonrel,django-nonrel/django-nonrel,Instagram/django,jamespacileo/django-france,skevy/django,mitsuhiko/django,mitsuhiko/django,django-nonrel/django-nonrel,disqus/django-old,disqus/django-old,jamespacileo/django-france