fix #592 regex flags on terms agg assigned to pattern prop instead of flags prop