Updated GetBetterNodeForSendingMessage function in GroupMatrix.