He wasn't. Really. He'd merely taken a tactical maneuver upon seeing her in the corridor which happened to lead him to the fourth-floor broom cupboard. If he happened to be in there for the duration of her stay on this floor, then it was coincidence and should be discarded as evidence of anything more malicious. He hoped he would be in here for the duration of her preferably brief stay, anyway, because she was lingering in discussion with a student and he eventually needed to get back to the library from his tea break.
Then Spencer showed up and stopped directly beside his temporary tactical dwelling place, looking like he was going to do something drastic, such as greet Hayley and attract her attention to this end of the corridor. This end of the corridor, and the cupboard in which William was currently in residence.
"Spencer!" he hissed. "It's Williams! Move!" Then he thought better of that plan - Hayley was still close, but she might not be looking yet - and popped the door of the cupboard open, hooking Spencer's robe with one hand and dragging him into the enclosed space to securely shut them both inside. "Shhhh," he warned immediately, eyes wide and finger to his lips.