Is this index selection useless?
The check is needed, because SetSelected() would throw an ArgumentOutOfRangeException.  

See reference source: http://referencesource.microsoft.com/System.Windows.Forms/a.html#fcae9a622a947f54 or read the documentation where it clearly states   

Condition for ArgumentOutOfRangeException


  The specified index was outside the range of valid values.