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

"Checks the type of the object..."
(The fact that it's a method and that it calls check_query_object_type is readily apparent)