Fix check_toplevel_config()

It didn't work, because it depended on getting the global configuration,
but at the point it was called in the normal check_config() path that hadn't
been set yet.