At some point I would like to eliminate the opendb flag and instead have the command handlers call a utility function if they need the DB open. But for the purpose of fixing this issue we should do whatever is most conservative.