More verbose error messages for incorrect/missing database groups (based on PR #2040)