Index: /trunk/src/org/openstreetmap/josm/gui/MapView.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 5989)
+++ /trunk/src/org/openstreetmap/josm/gui/MapView.java	(revision 5990)
@@ -678,5 +678,5 @@
      */
     public Collection<Layer> getAllLayers() {
-        return Collections.unmodifiableCollection(layers);
+        return Collections.unmodifiableCollection(new ArrayList<Layer>(layers));
     }
 
@@ -685,5 +685,5 @@
      */
     public List<Layer> getAllLayersAsList() {
-        return Collections.unmodifiableList(layers);
+        return Collections.unmodifiableList(new ArrayList<Layer>(layers));
     }
 
