c_types: rework group()

Fixes #236