Improve test_rand to test all produced bits, not just the lowest one.