Work around a bug in QueryRow

There seem to be multiple instances of this bug being reported;
a very quick scan shows at least #148 and #77, but I'm sure there
are others.