New topic tool and topic subscriptions don't work (clicking the buttons does nothing) when reply tool is disabled and the page would have reply links.
Reported at <https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#c-Anomalocaris-20220809043500-Start_new_section_button,_in_editor's_talkpage>.
Original report:
>>! In T314608#8133094, @Jack_who_built_the_house wrote:
> I have DT enabled, but Reply Tool disabled. This shows up at every page load.
>
> ```
> var commentNodes = $pageContainer[0].querySelectorAll('[data-mw-comment]');
> ```
> When Reply Tool is disabled, `commentNodes` here is populated only with `.mw-headline` nodes.
>
> `itemsById[id]` in code cited in T314608#8132373 tries to access a comment by its ID prefixed with `c-`. `itemsById` has only IDs prefixed with `h-`, hence the error.
An exception is thrown when loading the page:
```
Uncaught TypeError: Cannot set properties of undefined (setting 'parent')
at Array.map
at ThreadItemSet.js.ThreadItemSet.static.newFromAnnotatedNodes
at Object.init
at mw.dt.init
at Object.add
at dt.init.js
at runScript
at Array.<anonymous>
at flushCssBuffer
```