The same resource can actually be mapped into the logical space more than once if it appears on multiple super paths.

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2898 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
index 70bef30..191f0f7 100644
--- a/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
+++ b/dev/core/src/com/google/gwt/dev/resource/impl/ResourceOracleImpl.java
@@ -325,30 +325,32 @@
         // A rerooted resource blocks any other resource at this path.
         continue;
       }
+      int hitCount = 0;
       for (PathPrefix pathPrefix : pathPrefixSet.values()) {
         if (pathPrefix.allows(path)) {
           assert (path.startsWith(pathPrefix.getPrefix()));
           if (pathPrefix.shouldReroot()) {
-            path = pathPrefix.getRerootedPath(path);
+            String rerootedPath = pathPrefix.getRerootedPath(path);
             // Try to reuse the same wrapper.
-            Resource exposed = exposedResourceMap.get(path);
+            Resource exposed = exposedResourceMap.get(rerootedPath);
             if (exposed instanceof ResourceWrapper) {
               ResourceWrapper exposedWrapper = (ResourceWrapper) exposed;
               if (exposedWrapper.resource == resource) {
-                externalMap.put(path, exposedWrapper);
+                externalMap.put(rerootedPath, exposedWrapper);
                 break;
               }
             }
             // Just create a new wrapper.
-            AbstractResource wrapper = new ResourceWrapper(path, resource);
-            externalMap.put(path, wrapper);
+            AbstractResource wrapper = new ResourceWrapper(rerootedPath,
+                resource);
+            externalMap.put(rerootedPath, wrapper);
           } else {
             externalMap.put(path, resource);
           }
-          break;
+          ++hitCount;
         }
       }
-      assert (externalMap.containsKey(path));
+      assert (hitCount > 0);
     }
     return externalMap;
   }