@ffontaine - is the buildroot using deb or rpm specs from kamailio tree?
There is another set of groups, which doesn't have 'k' as prefix of the last word in the name -- for example, there is module_group_standard and module_group_kstandard. The module_group_k... were intended for packaging, the others should be for default compilation.
An alternative is to add some switch on a env variable and then set the values of those groups based on it, so when using it for buildroot, will skip pcre modules in standard and have own group.