switched group max_encoded_length to use a precomputed value instead of chain of CA_MAX()