David Lindsay, a sheep scientist at the University of Western Australia, responded.

Merino sheep only have a few sites in their body that affect temperature
regulation. The head is one and, in rams, the scrotum is another. (We
do an experiment with our students in which we use a hessian tube with
hot air to heat only the testes of rams and record their response. They pant
more [no surprise] but they also lose body temperature. The input to the
testes is less than the stimulated output from the lungs. If we heat an
equivalent surface of, say, the leg there is no panting response and a
slight rise in the body temperature. )

So if the head is in the shade, the
animal thinks that it is cool or at least as cool as if the whole animal
were in the shade. If you observe the animals in a huddle you will note
that the one thing they have in common is that their heads are always in
the shade of other sheep. In reality, they are not so silly because with
50mm or so of wool insulation they don't get a lot of the radiant or
convected heat to their bodies anyway.