XWIKI-8872: MessageTool can read from the wrong context in scheduler jobs or threads
* fix broken API in previous commit