Avoids signed overflow in ectest random number generation.