Fix a bug in Boolean terms and arrays.  Thanks to Jean-Christophe Filliatre for the report.