Fixed #14334 -- Query comparision now check for object types.

What happens if the pk field isn't in the self.query.select? I think using self.query.get_initial_alias() instead of self.query.get_meta().db_table should fix this issue.