Simulation: DistributedByFunction bug fixed