We denote by Conc(A) the semilattice of all finitely generated congruences of an (universal) algebra A, and we define Conc(V) as the class of all isomorphic copies of all Conc(A), for A in V, for any variety V of algebras. Let V and W be locally finite varieties of algebras such that for each finite algebra A in V there are, up to isomorphism, only finitely many B in W such that A and B have isomorphic congruence lattices, and every such B is finite. If Conc(V) is not contained in Conc(W), then there exists a semilattice of cardinality aleph 2 in Conc(V)-Conc(W). Our result extends to quasivarieties of first-order structures, with finitely many relation symbols, and relative congruence lattices. In particular, if W is a finitely generated variety of algebras, then this occurs in case W omits the tame congruence theory types 1 and 5; which, in turn, occurs in case W satisfies a nontrivial congruence identity. The bound aleph 2 is sharp.