cursor: handle query failure and invalid cursor flags on OP_REPLY.