Don't add the @sphinx_internal_class_name condition unless it's necessary.

This should deal with issue #568. Tests are all green, and looking through logs when the STI tests run confirm they get the condition (as there's not a clear index-to-model relationship in those circumstances - hence why this field exists), but in other search queries, the condition correctly does not exist.