Build repeating groups

This doesn't support nested repeating groups.