Better ComputeNextPrime semantics