> The line-number display has nothing to do with this, it works
> correctly in this case.

It may work correctly, but I the issue is with the fact that line
number and hl-line are out of sync. Can I prevent this?

--
Best regards,
Andrey Orst