Ontological query answering is the problem of answering queries in the presence of schema constraints representing the domain of interest. Datalog+/-is a commonly adopted family of languages for schema constraints, which includes tuple-generating dependencies (TGDs) and equality-generating dependencies (EGDs). Unfortunately, the interplay of TGDs and EGDs leads to undecidability or intractability of query answering when adding EGDs to tractable Datalog+/-fragments, like Warded Datalog+/-, for which, in the sole presence of TGDs, query answering is PTIME in data complexity. There have been attempts to limit the interaction of TGDs and EGDs and guarantee tractability, in particular with the introduction of separable EGDs, whose idea is making EGDs irrelevant for query answering as long as the set of constraints is satisfied. While being tractable, separable EGDs have limited expressive power.In this paper, we propose a more general class of EGDs, which we call "harmless", that subsume separable EGDs and allow to model and reason about a much broader class of problems. Unlike separable EGDs, harmless EGDs do affect query answering in the sense that, besides enforcing ground equality constraints, they specialize the query answer by grounding or renaming the labelled nulls introduced by existential quantification in the TGDs. Harmless EGDs capture the cases when the answer obtained in the presence of EGDs is strictly less general than -or an image of-the one, if any, obtained with TGDs only. We study the theoretical problem of deciding whether a set of constraints contains harmless EGDs and conclude it is undecidable. Nevertheless, we contribute a sufficient syntactic condition characterizing harmless EGDs, which is broad and useful in practice. We focus on the Warded Datalog+/-fragment and argue that, in such language, query answering keeps decidable and PTIME in data complexity in the presence of harmless EGDs.We study principled chase-based techniques for query answering in Warded Datalog+/-with harmless EGDs, conducive to an efficient algorithm to be implemented in state-of-the-art reasoners.