Fix for concurrent modification of the resources list during disposeAll.