While purebloods were unlikely to figure out how to do this, Harry had been voting in ways that had pissed off some muggleborns recently. Especially with him backing legislation requiring all Hogwarts students to celebrate traditional wizarding holidays not just no-maj ones. It seems that under Dumbledore Hogwarts had only celebrated no-maj Christian holidays and students who wanted to practice traditional wizarding celebrations were given detentions and lost house points. In fact, looking at the time, Harry would still be in a long Wizengamot session that included voting on that legislation.