Bug fix for and/or clauses being improperly optimized out due to off by
one errors.
Small tweaks for previous commit.