fix-#744: Querying by a field defined in a subclass raises InvalidQueryE...

...rror