He had her, he could feel it. There was something that happened inside a person's mind - rather similar to what happened within the energetic linkages in Hogwarts - when a decision had been reached. Thought molecules and notional atoms all shifted into gear, changing tangibly from facing in other, haphazard directions to facing towards the decision. It was always rewarding to watch, as for the Hat it usually meant that he had succeeded in orienting someone towards their greatest potential. It wasn't linked with Houses now, but he was wired to believe he was doing the same now. He could feel her change, feel her shift - and there was a slight shift under that, the potential of a change, perhaps just a notion, of all those unhappy thoughts and feelings pushing her towards the Castle instead of other places. He was not daunted by the gloom that followed in her. Human beings needed that too, he thought. They needed sadness to know they had to shift away from it and do something else. And to recognise the opposite when it arrived. 

Who am I to turn down a Hat? 

"Who indeed," said the Hat, but his tone was a lot kinder now.

I mean, I have nothing better to do. I'll get my gear together; give me a day or two and I'll be in your castle, hunting your monsters.

"Well done, Jezebel Bain!" he said, pleased altogether. "I'm sure you'll give the monsters the hell they deserve! Remember, not all want to eat you, but some certainly do! And we need you to be alive for a while longer!" And with this proclamation, deeming it to be the right time to leave. "Oh Flying Machine!" he called, and, as he felt the mundane being respond to the call, he grinned (you could kind of feel it in the brain space) at her. "See you at Hogwarts, Jezebel Bain!"

The Flying Machine swept down and grabbed him by the pointy tip, and off they went into the night, to pounce upon their next unsuspecting soul.