At first we thought it was a bug with the '||' operator, so we couldn't find it in the documentation, then while we were reporting it we realized it is a change in operator precedence. We mostly checked the https://wiki.postgresql.org/wiki/What's_new_in_PostgreSQL_9.5 for new changes, but in there it wasn't mention.
Sorry about this and thanks for the operator_precedence_warning, it will help a lot.