How can I underline a single row in a Writer table in docx format?

I want to put a thin border under the first row and only the first row of a multi-row table in Writer in a docx document. To do so, I select the cells of the first row, right click, select Table Format, Borders and add a thin border at the bottom.

The live view of the document looks like I want it. But when I save the document as .docx and reopen it, all lines of the table are underlined, i.e. have a border at the bottom.

If I repeat the same steps, and this time add the border only to a single cell, it works as expected and the reloaded document looks the same. Also if I underline a row, save as ODT and reload the document, it looks the same as expected.

Am I missing something, or is this a limitation of the docx format, or is this a bug?

Screenshot before saving:

Screenshot after loading:

Version on Ubuntu 18.04

This seems to be a bug. I tried on portable LO (64) Windows 7 and the result after reopening the docx file is similar to yours.

It’s probably a bug in the import/export filter for docx.

Workaround: Add a very thin empty first column which is not underlined

Issue not seen with LibreOffice (x64); OS: Windows 10.0.