Fix bug where DB existence check was looking at the wrong table.