Fix #4572

Not sure if there's a better, guicier way of handling the polymorphism in `DiscoveryNode.host()` and `port()`. Comments welcome.