fix a reference leak for non-simple conditions in boolean and/or expressions