Fixes too early optimization of binary &&/& bool constants. Fixes part of #15392