Fixes flaky no-such-element exception from bad generation of random test...

...s.


Latest in the jenkins whack-a-mole cc> @eed3si9n for review.