Work around a bug in QueryRow

An attempt to implement the workaround as discussed in #148.