dbcheck: add support for restoring missing forward links