Fix selectservers().

See Redmine #5458. Thanks to Bob Ingersoll for spotting it.
Add acceptance test for selectservers().