Fixed group peer chosing algorithm.

Groups should be much more stable.
Reduced the risk of two people being given the same peer id in groups.