Fix message result ordering in API call.

Fixes regression introduced by 3f1a1828.