MDL-64057 core_message: fix bug with favourite count aggregation