All the above seem to be true :\ Indeed.. it looks like it could have been done it in a much simpler way, without the custom YAML variable:

    (After the Pagination links)

    <!-- Comments visibility -->
    <script type="text/javascript">
      function getElementsById(elementId) {
        var elementCollection = new Array();
        var allElements = document.getElementsByTagName("*");
        for(i = 0; i < allElements.length; i++)
          if(allElements[i].id === elementId)
            elementCollection.push(allElements[i]);
        return elementCollection;
      };
      function hideElementsById(id) {
        var elements = getElementsById(id);
        for(i = 0; i < elements.length; i++)
          elements[i].hidden = true;
      };
      hideElementsById("comments");
    </script>

This is executed once, after the Index is paginated and rendered.

*(Closing this Pull Request and adding a new one.)*