Hey! Nice! You could probably simplify this using the DependencyFacet.hasEffectiveDependency() method.