more detection of corrupt databases + look inside the private database

Signed-off-by: Mattias Andrée <maandree@operamail.com>