Fix boolean/pattern confusion for term generation..