With prefer_localhost_replica=1 max_distributed_connections uses max_threads before this patch. Fixes: #14936 Previous fix: #9673