In Dart, ImmutableLists are just a projection of an underlying list. I.e. if the underlying list changes, the ImmutableList also changes. So we can't make optimizations based on checking whether a collection is an ImmutableList. This reverts commit a10c02cb4107624b58b4b3f54da6bf0e0e70c6c6. Closes #8023