Changes the approach for retrieving the comments nodes, now using document.createTreeWalker().
Closes #3458164