Changing the HTML of your page shouldn't hide aggregate ratings in the Google search results.
The only reason that changing the HTML would hide them would be if you broke the structured data. Use Google's structured data testing tool to ensure that your microdata is still available to Googlebot in the page source.
Otherwise, Google may choose to show or not show the aggregate ratings at any time. Their rich snippets FAQ says:
Google does not guarantee that Rich Snippets will show up for search results from a particular site even if structured data is marked up and can be extracted successfully according to the testing tool. Here are some reasons that marked-up pages might not be shown with Rich Snippets:
- The marked-up structured data is not representative of the main content of the page or potentially misleading.
- Marked-up data is incorrect in a way that the testing tool was not able to catch.
- Marked-up content is hidden from the user.
- The site has very few pages (or very few pages with marked-up structured data) and may not be picked up by Google's Rich Snippets system.
In my experience, Google has to trust your site enough to show rich snippets. Google's trust in your site may fluctuate over time through factors out of your control. That may cause your rich snippets to appear and disappear from the search results.