Fix Trac #3017: ensure that we quantify over enough type variables when equalities...