Underscores in headings

Since switching to Goldmark, I cannot use underscores (_) in headings if I want to use .TableOfContents

Explanation:
In BlackFriday, when I wanted a heading like this:
## _cmp_dc_views_sd_
I needed to escape the first underscore, otherwise the heading would be in italics. So I had this:
## \_cmp\_dc\_views\_sd_

The result was a non-italicized header and a non-italicized entry in .TableOfContents

However, since switching to Goldmark, the escape backslashes are shown in .TableOfContents. Interestingly, fewer are needed to disable italics in the heading itself:
## \_cmp_dc_views_sd_

So I am currently left with either italicized headings or an ugly Table of Contents.

Is there some setting that will allow .TableOfContents to ignore escape characters?