Previous fix to group install introduced a different bug trying to strip() group names at the wrong level. This patch fixes that. Fixes #3358