Suggested by @MarcoFalke after #14627 and possibly #14420. We should warn if an unrecognised/incorrect section is present in bitcoin.conf. i.e `[testnet]` is present instead of `[test]`.
{
    size_t option_index = key.find('.');
    std::string arg_no_net;
    if (option_index == std::string::npos) {
        arg_no_net = key;
    } else {
        arg_no_net = std::string("-") + key.substr(option_index + 1, std::string::npos);
    }
    LOCK(cs_args);
    for (const auto& arg_map : m_available_args) {
        if (arg_map.second.count(arg_no_net)) return true;
    }
    return false;
}
std::vector<std::string> ArgsManager::GetArgs(const std::string& strArg) const