tdb: fix tdb_check() on read-only TDBs to actually work.