Issue #21746:conditional implementation of gapless numbering