Hi Jan,
Unfortunately, this issue sounds like it might be a Confluence bug.
I had a quick look through Confluence public issues but could not find anything relating to this.
Have you been able to reproduce reliably? Or has the bug disappeared?
Are you using a static, or dynamic macro?
Thanks,
Dave