Fix minor problems caused by adding the rowid to the records in stat4.