In general, `Stream#toList()` is not a transparent replacement for `.collect(Collectors.toList()))`, as the former returns an immutable list. This commit reverts some of those changes, where the returned `List` instance was expected to be mutable. See gh-29203