don't call pkgdb_downgrade_lock with null db