MDL-13805 core_message: fixed some problems caused by a hasty backport