On the foundations of stochastic dislocation dynamics