Try to fix Stochastic order scan by using OrderedDict more often.