Avoid a notice, as $site does not exist outside the if.

Independently fixed in the 7.x-3.x branch