diff --git a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
index a8375fb..aa19596 100644
--- a/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
+++ b/bundlerepository/src/main/java/org/apache/felix/bundlerepository/ResolverImpl.java
@@ -176,7 +176,7 @@
             {
                 fake.addRequire((Requirement) iter.next());
             }
-            if (!resolve(fake, locals, remotes))
+            if (!resolve(fake, locals, remotes, false))
             {
                 result = false;
             }
@@ -185,7 +185,7 @@
         // Loop through each resource in added list and resolve.
         for (Iterator iter = m_addedSet.iterator(); iter.hasNext(); )
         {
-            if (!resolve((Resource) iter.next(), locals, remotes))
+            if (!resolve((Resource) iter.next(), locals, remotes, false))
             {
                 // If any resource does not resolve, then the
                 // entire result will be false.
@@ -204,7 +204,7 @@
         return result;
     }
 
-    private boolean resolve(Resource resource, Resource[] locals, Resource[] remotes)
+    private boolean resolve(Resource resource, Resource[] locals, Resource[] remotes, boolean optional)
     {
         boolean result = true;
 
@@ -246,7 +246,7 @@
                             Capability bestCapability = getBestCandidate(candidateCapabilities);
 
                             // Try to resolve the best resource.
-                            if (resolve(((CapabilityImpl) bestCapability).getResource(), locals, remotes))
+                            if (resolve(((CapabilityImpl) bestCapability).getResource(), locals, remotes, optional || reqs[reqIdx].isOptional()))
                             {
                                 candidate = ((CapabilityImpl) bestCapability).getResource();
                             }
@@ -282,11 +282,11 @@
                 {
 
                     // Try to resolve the candidate.
-                    if (resolve(candidate, locals, remotes))
+                    if (resolve(candidate, locals, remotes, optional || reqs[reqIdx].isOptional()))
                     {
                         // The resolved succeeded; record the candidate
                         // as either optional or required.
-                        if (reqs[reqIdx].isOptional())
+                        if (optional || reqs[reqIdx].isOptional())
                         {
                             m_optionalSet.add(candidate);
                         }
