The implementation does not bother checking domains, nor does it bother trying to return a DC outside of the site that the DC currently resides in.
Fixed as d1730d6ff19b60ebf9f6b18aaa4afab733b18b25 for 4.9.0