The season premiere of Game of Thrones had a surprising allusion to Harry Potter, specifically in regard to how you can check books out from the library.

One of the basic rules of the Harry Potter series is that students are not allowed to take books from the Hogwarts library’s restricted section without permission from a professor — and the Game of Thrones premiere shows that this rule holds up in Westeros, too.

Jim Broadbent, who played Professor Slughorn in the Harry Potter films, made his debut in the Game of Thrones Season 7 premiere “Dragonglass”. He played Archmaester Ebrose, a character who Sam Tarly encounters at the Citadel, where he’s trying to become a Maester in order to help Jon Snow in his war efforts against the army of the dead.

Unfortunately for Sam, he has a long way to go before he’s an official Maester, and the tasks he performs along the way are even less pleasant than the tasks Arya Stark performed at the House of Black and White. He must clean bedpans and weigh livers for Archmaester Ebrose. But to rub salt in the wound, Archmaester Ebrose denies him access to the restricted section of the library. It’s old hat for Professor Slughorn, who has told several students off from the Restricted Section in his Hogwarts days. But it’s a new roadblock for Sam Tarly.

Sam and Gilly in 'Game of Thrones' Season 7 episode 1, 'Dragonstone'
Sam and Gilly at the Citadel in the 'Game of Thrones' Season 7 premiere 

Game of Thrones Season 7 is currently airing Sunday nights on HBO.

Photos via HBO