That's not an excuse for sloppy writing though. Even a book about magic needs a level of consistency within its own universe and when the quality is above a certain level, I'm prepared to suspend disbelief and go along with the story and not nitpick.
It's also a children's book that evolved in a book for young adults. I always thought it was supposed to be whimsical and fun, not have serious complicated plots