The `randrange()` method expects the range to be non zero.
In the `peermanager_tests/select_peer_random` case the `max` variable
can be 0 and fail the test. Since we still want to test slot 0, set slot = 0
= 0 when max == 0 without calling the `randrange()` method.