1.2.X version of my small identifier change/fix

See https://github.com/toastdriven/django-haystack/pull/440

Apologies if for the bad github-foo. There's probably a way to do a pull request that would apply to both branches, or to link these two requests or something.