This isn't new to
Java 7, but would have already caused the same exception years ago.
The problem is with the way you're iterating and removing. If you iterate using an Iterator (which a for-each loop uses in the background), then you cannot change the collection you're iterating over except through the Iterator*.
So change your inner loop to do just that. It means you need an explicit Iterator:
* Some later collection types like ConcurrentHashMap are more lenient.