Fix a bug in for clause in EntityTreeModel
The body of the for loop calls function monitoredCollectionRemoved, which modifies the list which is iterated over. This can lead to undefined behavior, so it's better to just iterate over a copy.
The body of the for loop calls function monitoredCollectionRemoved, which modifies the list which is iterated over. This can lead to undefined behavior, so it's better to just iterate over a copy.
mentioned in commit 046a3e20