Prevents uselessly joining to the FROM table

If a QueryBuilder instance was created for querying objects in a non-root
DataObject (a subclass of SiteTree for instance), then it would join back to
itself in QueryBuilder::joinSubclassTables and accomplish nothing. This change
prevents that from occurring.
Fixes undefined variable $locale ViewResultsRetriever->QueryParamName is falsy