Fix issue with moving a group leader in a raid

Moving a group leader to the ungrouped section was not correctly
finding an appropriate new group leader.