Magento 2 Product list aggregate rating fix

During our work with the Magento 2 Rich Snippets module, we noticed numerous errors on the product list page when switched to list mode. The errors were generated by the standard Magento 2 Luma theme, when attempting to aggregate rating markup rendering for each product in the product list. This article outlines a configurable solution to address this issue. We will have an opportunity to disable this fix for any custom theme which doesn’t have this error or in case the next Magento 2 version has a fix for this included.