I don't wish to add to the level of snark, but from what Sumi said, I think there were some other clues about how powerful the main wizard was that the group could have picked up on.
First... a 17th level barbarian jailor? If the jailor is 17th level, what level is his master going to be? Presuming that was a really tough fight, was it not an indication that the party was in SERIOUS trouble being there, and should maybe consider withdrawing?
Second... Sumi mentioned in his second post that the party had captured and interrogated the wizard's apprentice. Unless the apprentice really didn't know, or refused to talk, shouldn't they have been able to get all sorts of juicy information out of him or her, like what's the most powerful spell the apprentice has seen the master cast, or what guards does the master have?
That said... I've been in that sort of situation where unexpectedly WHAM your character is dead, and I totally sympathize.
