[Olena-patches] 3860: Fix nondeterminism in generators.