diff --git a/framework/src/main/java/org/apache/felix/framework/Felix.java b/framework/src/main/java/org/apache/felix/framework/Felix.java
index b7205fc..6400074 100644
--- a/framework/src/main/java/org/apache/felix/framework/Felix.java
+++ b/framework/src/main/java/org/apache/felix/framework/Felix.java
@@ -3532,27 +3532,26 @@
         }
 
         // Ask the service registry for all matching service references.
-        final List refList = m_registry.getServiceReferences(className, filter);
+        final Collection refList = m_registry.getServiceReferences(className, filter);
 
         // Filter on assignable references
         if (checkAssignable)
         {
-            for (int refIdx = 0; (refList != null) && (refIdx < refList.size()); refIdx++)
+            for (Iterator refIter = refList.iterator(); refIter.hasNext();)
             {
                 // Get the current service reference.
-                ServiceReference ref = (ServiceReference) refList.get(refIdx);
+                ServiceReference ref = (ServiceReference) refIter.next();
 
                 // Now check for castability.
                 if (!Util.isServiceAssignable(bundle, ref))
                 {
-                    refList.remove(refIdx);
-                    refIdx--;
+                    refIter.remove();
                 }
             }
         }
 
         // If the requesting bundle is the system bundle, ignore the effects of the findhooks
-        List resRefList = (bundle == this ? new ArrayList(refList) : refList);
+        Collection resRefList = (bundle == this ? new ArrayList(refList) : refList);
 
         // activate findhooks
         Set<ServiceReference<org.osgi.framework.hooks.service.FindHook>> findHooks =
diff --git a/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java b/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
index d95706b..7bd01d2 100644
--- a/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
+++ b/framework/src/main/java/org/apache/felix/framework/ServiceRegistry.java
@@ -19,6 +19,7 @@
 package org.apache.felix.framework;
 
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.Dictionary;
 import java.util.HashMap;
@@ -239,12 +240,12 @@
         }
     }
 
-    public synchronized List getServiceReferences(String className, SimpleFilter filter)
+    public synchronized Collection getServiceReferences(String className, SimpleFilter filter)
     {
         if ((className == null) && (filter == null))
         {
             // Return all services.
-            filter = new SimpleFilter(Constants.OBJECTCLASS, "*", SimpleFilter.PRESENT);
+            filter = new SimpleFilter(null, null, SimpleFilter.MATCH_ALL);
         }
         else if ((className != null) && (filter == null))
         {
@@ -261,9 +262,7 @@
         }
         // else just use the specified filter.
 
-        Set<BundleCapability> matches = m_regCapSet.match(filter, false);
-
-        return new ArrayList<BundleCapability>(matches);
+        return m_regCapSet.match(filter, false);
     }
 
     public synchronized ServiceReference<?>[] getServicesInUse(Bundle bundle)
diff --git a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
index 982957e..8f0c605 100644
--- a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
+++ b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
@@ -239,7 +239,10 @@
                 if (existingCaps != null)
                 {
                     matches.addAll(existingCaps);
-                    matches.retainAll(caps);
+                    if (caps != m_capSet)
+                    {
+                        matches.retainAll(caps);
+                    }
                 }
             }
             else
