With the following user macro the rendering of the page leads to the exception:
Fehler beim Rendern des Makros 'toc': com.ctc.wstx.exc.WstxLazyException com.ctc.wstx.exc.WstxParsingException: Duplicate attribute 'id'. at row,col {unknown-source} : 2,52
User macro:
## Macro title: My Macro
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name
## This is an example macro
## @noparams
$body
page content:
<ac:macro ac:name="toc"/>
Heading 1
<ac:macro ac:name="write-through"><ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter><ac:rich-text-body>
Heading 2
</ac:rich-text-body></ac:macro>