The call to `add_to_group` in `build_group` failed as `add_to_group` was a local function defined later. This reorders the functions to avoid that.
xmp files so that groups can be maintained across database instances