Make stack grouping optional