XWIKI-9014: Error on page when viewing profile pages on IE8 on XEM
Fixed.
[cleanup] Improved code efficiency