[DBAL-774] Fix QueryBuilder parsing order of joins

This is a fix for [DBAL-774](http://www.doctrine-project.org/jira/browse/DBAL-774) and is the followup for PR #548.