> maybe it somehow helped that the source was markdown instead of html?
That's probably it. Most of my issues were related to CSS, which markdown does not have[0]. The duplicated headline wasn't CSS though, that is by far the oddest issue. I'll probably file a bug report to pandoc after I replace all the text in this document with lorem ipsum (it is a document for work, so I can't share it publicly in its current form).
[0] unless you embedded your own CSS since markdown technically allows arbitrary HTML