Merge "Fix a ConcurrentModificationException when dumping resources" into tm-dev