Helper function to fold different language versions of the same doc into
a group