I never liked this either. One thing that hasn't been mentioned is that all the others spoke the truth in their songs: it seemed impossible to lie even when the character wanted to, like in I'll Never Tell, and Life's a Show. Notice Xander's lines in "I've Got a Theory", however:
I've got a theory we should work this out...
It could be witches, some evil witches,
which is ridiculous 'cause witches, they were persecuted, wicca good and love the Earth and woman pow'r and I'll be over here.
Hardly indicative of someone who knows they did it. For one, he doesn't really want them to work it out. Plus, it can't be witches, some evil witches...it was him. He knows this.
Due to the inconsistencies and the fact that they were hard pressed to get any exposition in at the end at all, I'm guessing something more coherent was cut or replaced, resulting in what we have. Not perfect, but plot was always going to be put to the back for character progression in this episode.