GROOVY-7098: Fix foreach loop style iteration when the inferred type of the collection is exactly Iterable