My code didn't set problem.  This is cleaner

    if 'shared_rng' not in problem:
        problem.shared_rng = random.Random(self.context['seed'])
    return problem.shared_rng