Note: This trick only works until you leave the room. Crawl under the bookshelf or go through the portrait. When you first enter the room, straight ahead of the door is a bookshelf with a crawl space underneath it. Shoot a Flipendo at the middle of the bookshelf. Then, go to where Percy will not see you. When he goes to the place, go up behind him and Flipendo him. Back off after you Flipendo him a few times. He will then move forward. Flipendo him again, and repeat. If done correctly, he will disappear behind the wall, but will actually be stuck there. He will not be able to curse you or move unless you leave the main reading room. This is difficult and requires precise timing.