FELIX-1166 Be sure to unget the unregistering service (only required for dynamic
references which do not cause the component to deactivate).

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@778604 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java b/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java
index f20d4ab..ba52a86 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/DependencyManager.java
@@ -358,6 +358,9 @@
                 {
                     invokeUnbindMethod( reference );
                 }
+                
+                // make sure the service is returned
+                ungetService( reference );
             }
         }