It turns out that there was also an issue with duplicated macro end marker. I fixed this in a second commit as the original issue wasn't properly fixed after fixing the issue that I described in previous comment.