Fix bug in recovery of multistatement transactions from WAL