Fix metric grouping for extra metrics with multiple values