Redo version detection to be not quite so blatantly wrong.