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

`pk = self.query.get_meta().concrete_fields[self.query.get_meta().pk_index()]` > `pk = self.query.get_meta().pk]`