similar kind of issue i observed some time back while we were upgrading from 12.0 to 12.2 not sure about service pack but it was behaving like this -
In 12.0
2 expressions seperated by and/or with or without circular brackets behaved correctly
i.e. expr 1 and/or expr 2
In 12.2. above 2 expressions needs to be mentioned in brackets then only it worked
i.e.( expr 1) and/or (expr 2)
Looks like after 12.0 version, expressions needs to be in closed in brackets to give proper results.