I found this issue while upgrading from version 4.10.0 to 5.1.0.
It appears that a custom DNS set on a client is never called. Here is a gist with a working test in 4.10.0 and a failing one with 5.1.0.
https://gist.github.com/jnh5y/c1290f4808f9a9b81760de007a58e151