The fix to
FELIX-5974 has caused an issue for the default reference scope of bundle. When a component has a simple @Reference and that component is deactivated the services that it references will not be ungotten by SCR. This causes all kinds of issues for use counting of the consumed service.
The issue is that org.apache.felix.scr.impl.manager.DependencyManager.close(ComponentContextImpl<S>, EdgeInfo) is calling RefPair.unsetServiceObject now for all RefPair types. The RefPair types MultiplePrototypeRefPair and SinglePrototypeRefPair were updated to have unsetServiceObject to also have that service be ungotten. But the default SingleRefPair type was not. This causes issues when ultimately the DependencyManagers are deactivated later which then closes the customizer for the dependency and org.apache.felix.scr.impl.manager.DependencyManager.AbstractCustomizer.ungetService(RefPair<S, T>) is called. By this time there will now be a null service and it will not be ungotten.