MDL-63724 core_message: move message redirection into helper function