move flattenTerms before AddStrictStar