Make DependencyFlag.DEMANDED and DependencyFlag.UNDEMANDED work according to the javadoc of those flags: if DEMANDED, the dependency is demanded regardless of the dependent's service mode rules; if UNDEMANDED, the dependency demand is never propagated.