First, let me say that I do not recommend carrying in a school building while voting. Too much opportunity for trouble.
That said, it is my opinion that a "school" is not a building, it is a group of people. That's why we use phrases like school-house to describe the building. Same thing with "college", "faculty", and "congregation". All relate to groups of people, not places or things.
Where I vote, the school is closed on election day. There is no school that day. The building is merely a voting place, and as such, I believe that the best view is that carrying when there is no school in session within the building that normally houses the school is perfectly legal. Same idea as with the no-carrying-in-court rule. In the City of Falls Church, for example, the General District Court is in session on Tues. and Thurs. mornings (if I recall correctly) in the same room used for meetings of the City Council. When there's no judge there, it's not a court.
If anyone were arrested for carrying in a school building on election day when no school is in session, and hired me to represent them, that (along with interference with voting rights), would be the defense I'd make.