jgm/pandoc — pull request #1383 by jkr (2014-06-29 20:42:42+00:00)
Title: Docx writer: insert bookmark tags inside <w:p> tag.

I've only been able to test this by eye and by checking the xml, but it seems to take care of the issue.