Fix host, service sort order in StatusDataWriter.

Fixes #5775