Unit test and fix for DDC-2506: CTI JOIN WITH conditionals failing.
Merge branch 'DDC-2506' of https://github.com/mattjanssen/doctrine2