Fix for quantifiers containing Boolean terms.
Bug fix for rep-set.

(Cherry-picked from commit c71ec27 in master.)