Fix an edge case with noisy URLs

https://bitbucket.org/carljm/django-localeurl/pull-request/8/fix-an-edge-case-with-noisy-urls/diff