Fix for $this->_set_database() returning NULL when no active group is specified

I left an error in my last pull request - this one fixes that error.