It is widely attested that university students face considerable difficulties with reasoning in analysis, especially when dealing with statements involving two different quantifiers. We focus in this paper on a specific mistake which appears in proofs where one applies twice or more a statement of the kind "for all X, there exists Y such that R(X, Y)", and forgets that in that case, a priori, "Y depends on X". We analyse this mistake from both a logical and mathematical point of view, and study it through two inquiries, an historical one and a didactic one. We show that mathematics teachers emphasise the importance of the dependence rule in order to avoid this kind of mistake, while natural deduction in predicate calculus provides a logical framework to analyse and control the use of quantifiers. We show that the relevance of this dependence rule depends heavily on the context: nearly without interest in geometry, but fundamental in analysis or linear algebra. As a consequence, mathematical knowledge is a key to correct reasoning, so that there is a large distance between beginnersâ€™ and expertsâ€™ abilities regarding control of validity, that, to be shortened, probably requires more than a syntactic rule or informal advice. (orig.)