Do not modify input array of allSettled

Fixes #336.
Fixes #338.

Sorry this got lost in the shuffle, @rkatic.