tdb: make check more robust against recovery failures.