Bugfix: Invalid JOIN condition when adding new JOIN clause in front of another existing JOIN clause