pdb_tdb: fix the upgrade code, db_traverse returns the number of records!