FELIX-4055 don't rely on correct state when getting or ungetting service

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1480029 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java b/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
index fc4371c..4d4ec8c 100644
--- a/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
+++ b/scr/src/main/java/org/apache/felix/scr/impl/manager/ImmediateComponentManager.java
@@ -763,7 +763,7 @@
                     if ( m_componentContext == null )
                     {
                         //state should be "Registered"
-                        S result = (S) state().getService( this );
+                        S result = (S) Registered.getInstance().getService( this );
                         if ( result == null )
                         {
                             success = false;;
@@ -802,7 +802,7 @@
                 {
                     if ( m_useCount.get() == 0 )
                     {
-                        state().ungetService( this );
+                        Active.getInstance().ungetService( this );
                         unsetDependenciesCollected();
                     }
                 }