instead of this:
'slug' => 'group-links',
'parent_url' => $groups_link,
Use this:
'parent_slug' => $bp->groups->current_group->slug,
'parent_url' => bp_get_group_permalink( $bp->groups->current_group ),
instead of this:
'slug' => 'group-links',
'parent_url' => $groups_link,
Use this:
'parent_slug' => $bp->groups->current_group->slug,
'parent_url' => bp_get_group_permalink( $bp->groups->current_group ),