Substitution Lemma for Dependent Judgments