diff --git a/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java b/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
index 65321a3..d0a3381 100644
--- a/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/BundleWiringImpl.java
@@ -35,13 +35,12 @@
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
 import org.apache.felix.framework.cache.JarContent;
 import org.apache.felix.framework.cache.Content;
-import org.apache.felix.framework.resolver.HostedCapability;
-import org.apache.felix.framework.resolver.HostedRequirement;
 import org.apache.felix.framework.resolver.ResolveException;
 import org.apache.felix.framework.resolver.ResourceNotFoundException;
 import org.apache.felix.framework.util.CompoundEnumeration;
@@ -50,7 +49,6 @@
 import org.apache.felix.framework.util.Util;
 import org.apache.felix.framework.util.manifestparser.ManifestParser;
 import org.apache.felix.framework.util.manifestparser.R4Library;
-import org.apache.felix.framework.wiring.BundleCapabilityImpl;
 import org.apache.felix.framework.wiring.BundleRequirementImpl;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleException;
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java b/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
index 7475ed6..c81e286 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/Candidates.java
@@ -711,14 +711,21 @@
                 // really be attached to the original host, not the wrapper.
                 if (!c.getNamespace().equals(BundleRevision.HOST_NAMESPACE))
                 {
-                    Set<BundleRequirement> dependents =
-                        m_dependentMap.get(((HostedCapability) c).getDeclaredCapability());
+                    BundleCapability origCap =
+                        ((HostedCapability) c).getOriginalCapability();
+                    // Note that you might think we could remove the original cap
+                    // from the dependent map, but you can't since it may come from
+                    // a fragment that is attached to multiple hosts, so each host
+                    // will need to make their own copy.
+                    Set<BundleRequirement> dependents = m_dependentMap.get(origCap);
                     if (dependents != null)
                     {
+                        dependents = new HashSet<BundleRequirement>(dependents);
+                        m_dependentMap.put(c, dependents);
                         for (BundleRequirement r : dependents)
                         {
                             Set<BundleCapability> cands = m_candidateMap.get(r);
-                            cands.remove(((HostedCapability) c).getDeclaredCapability());
+                            cands.remove(origCap);
                             cands.add(c);
                         }
                     }
@@ -726,15 +733,20 @@
             }
 
             // Copy candidates for fragment requirements to the host.
-            // This doesn't record the reverse dependency, but that
-            // information should not be needed at this point anymore.
             for (BundleRequirement r : hostRevision.getDeclaredRequirements(null))
             {
-                SortedSet<BundleCapability> cands =
-                    m_candidateMap.get(((HostedRequirement) r).getDeclaredRequirement());
+                BundleRequirement origReq =
+                    ((HostedRequirement) r).getOriginalRequirement();
+                SortedSet<BundleCapability> cands = m_candidateMap.get(origReq);
                 if (cands != null)
                 {
                     m_candidateMap.put(r, new TreeSet<BundleCapability>(cands));
+                    for (BundleCapability cand : cands)
+                    {
+                        Set<BundleRequirement> dependents = m_dependentMap.get(cand);
+                        dependents.remove(origReq);
+                        dependents.add(r);
+                    }
                 }
             }
         }
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java b/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
index f24ada3..dbdad1c 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/HostedCapability.java
@@ -68,7 +68,7 @@
         return hash;
     }
 
-    public BundleCapabilityImpl getDeclaredCapability()
+    public BundleCapabilityImpl getOriginalCapability()
     {
         return m_cap;
     }
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java b/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
index 7af7a14..58dadce 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/HostedRequirement.java
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -67,7 +67,7 @@
         return hash;
     }
 
-    public BundleRequirementImpl getDeclaredRequirement()
+    public BundleRequirementImpl getOriginalRequirement()
     {
         return m_req;
     }
diff --git a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
index 436f692..84f5b27 100644
--- a/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/resolver/ResolverImpl.java
@@ -157,7 +157,7 @@
                         {
                             faultyRevision =
                                 ((HostedRequirement) rethrow.getRequirement())
-                                    .getDeclaredRequirement().getRevision();
+                                    .getOriginalRequirement().getRevision();
                         }
                         if (optional.remove(faultyRevision))
                         {
@@ -313,7 +313,7 @@
                     {
                         faultyRevision =
                             ((HostedRequirement) rethrow.getRequirement())
-                                .getDeclaredRequirement().getRevision();
+                                .getOriginalRequirement().getRevision();
                     }
                     if (revisions.remove(faultyRevision))
                     {
@@ -465,7 +465,7 @@
                         {
                             faultyRevision =
                                 ((HostedRequirement) rethrow.getRequirement())
-                                    .getDeclaredRequirement().getRevision();
+                                    .getOriginalRequirement().getRevision();
                         }
                         if (optional.remove(faultyRevision))
                         {
@@ -1503,7 +1503,7 @@
     {
         if (c instanceof HostedCapability)
         {
-            return ((HostedCapability) c).getDeclaredCapability();
+            return ((HostedCapability) c).getOriginalCapability();
         }
         return c;
     }
@@ -1512,7 +1512,7 @@
     {
         if (r instanceof HostedRequirement)
         {
-            return ((HostedRequirement) r).getDeclaredRequirement();
+            return ((HostedRequirement) r).getOriginalRequirement();
         }
         return r;
     }
