Modify the OR-clause handling so that it can safely deal with OR-clause 
with 17 or more terms.  Fix for ticket [10fb063b1179be53ea0b53bb].