XRENDERING-373: PutFootnotes macro does not work properly inside HTML macro
* bulletproofing (credit to vmassol)

(cherry picked from commit b56f5c58facb0994fb09dbb8d1e1c4d86172ab5f)

Conflicts:
	xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/HTMLMacro.java