fix mem leak when regrouping rex sequences