Use single random number generator.

Instantiating a new RNG every function call could lead to functions
using the same RNG seed, which messes with the randomness that we're
going for.