fix issue #8342

Unions with infinite elements now interleave.
Uses the roundrobin recipe from the documentation for itertools.
islice -> itertools.islice