DOCX: Fix incorrect styling of hyperlinks

The <w:r> tags for hyperlinks are not children of <w:p>, use the
ancestor axis instead of getparent().