Renumber to exclude paras in hidden section?

I have a LO Writer template containing numbered paragraphs and sections that are programmatically hidden. These sections contain numbered paragraphs.

The problem is that when a section is hidden the paragraph numbering does not change to exclude the hidden paragraphs. The visible paragraph numbers are not consecutive.

Is there any way to exclude hidden paragraphs/sections from document paragraph numbering.

Thanks for your help.

LO Writer versions 4.3.5 & 4.3.4; Windows 7.