Fix for problem with WHERE CASE LIKE

See details here: https://groups.google.com/forum/#!topic/doctrine-user/EbVMYOPnHPs