BUG DataQuery::getFinalizedQuery misses left joins

Fixes a regexp that could never be matched and was wrong anyway.

Comment and code in GetFinalizedQuery() do not match.
This PR solves an issue in our project where the Query would not contain left joins for addtional tables needed.