To my understanding, it happens like this:
High (internal) rank, at a school that performs well in the subject-
If your internal rank is good, and then, for whatever reason, you bomb the externals, your good internal rank and high-performing cohort means your internal will still be good, but...