non-lazy fix would be to rewrite such that these don't rely on a collection/sequence implementation-specific iteration order