XWIKI-11400: When an icon is displayed, it changes the value of the $icon variable in the document context.

(cherry picked from commit f9f7718490df9a2ced2b2408d60a191ef521dd22)