Fix sporadic error
   "RuntimeError: dictionary changed size during iteration"
   @smyers proved the loop was nondeterministic, still not sure why