Calc: Newlines don't work in all cells

Calc Version: 6.0.7.3 on Linux Mint 19.

A formula with an inserted newline was copied into cells 2-640. In cells 11-640 the formula is displayed in the formula bar as:
=IF(SUM(IFNA(MATCH($A635,$A$2:$A634,0),0),IFNA(MATCH($A635,$A636:$A$99999,0),0))>0, SUM(IFNA(MATCH($A635,$A$2:$A634,0)+1,0),IFNA(MATCH($A635,$A636:$A$99999,0)+ROW(A635),0)),"")

In cells 2-10 the formula is displayed in the formula bar as:
=IF(SUM(IFNA(MATCH($A3,$A$2:$A2,0),0),IFNA(MATCH($A3,$A4:$A$99999,0),0))>0,SUM(IFNA(MATCH($A3,$A$2:$A2,0)+1,0),IFNA(MATCH($A3,$A4:$A$99999,0)+ROW(A3),0)),"")

If the formula above is copied into an editor, it appears as the first one.

Any suggestions as to how to get cells 2-10 to display as cells 11-640?

Maybe this bug report Bug 119928 - Newline in cell formula are ignored when copy-pasting more than one cell in Calc 6.x

It may be related, but I just tried copying cell 11 (ctrl_c) into cell 10 (ctrl-v); cell10 formula displayed with out newline.