Handle empty results from failed connections in _remote_md5()

Fixes #5800