Efficient Dependency Analysis for Rule-Based Ontologies