The way to avoid it is to just handle the view switch entirely in the sidebar, rather than consulting the heatmap, if comment view must be activated.