It might be a little cheaper here to

    sampler = Sampler()
    sampler.init(shared, group)
    new_group = module.Group()
    new_group.init(shared)
    for _ in xrange(value_count):
        value = sampler.eval(shared)
        new_group.add_value(shared, value)