When removing the local domain, only do so when the result
will be a host name. This is matches the documented behaviro.
The previous behavior would remove the domain name even if
the result retained a dot.
This fixes rsh connections from a.example.com to example.com.
This is also reported to fix rsh connections from host xxx to
yyy.example.com.
PR: 88301