I know I can escape backticks, like \`.

I though I could escape backticks within backticks, as I did in a [comment](https://mathoverflow.net/questions/450025/do-x-and-y-have-the-same-cardinality-if-their-families-of-finite-subsets-do/450084#comment1163261_450084), but it's not working here: `a\`b`. See a [comment](https://meta.mathoverflow.net/questions/5709/how-can-i-use-backticks-in-math-mode-if-there-are-other-backticks-in-the-paragra#comment28845_5709) where it does happen.

Backticks in math mode work if there are no other backticks in the paragraph (although it took a really long time to render as I was editing): $\sigma`(C \setminus A)$.

Single backticks in math mode do *not* work if there are other backticks in the paragraph: $\sigma`(C \setminus A)$ `backticks`.  (Wait, when I first posted this, the backtick inside math mode and the first backtick outside matched.  After edit, they do not.  The more data I gather, the more confused I am.)

Escaping creates an error: $\sigma\`(C \setminus A)$ `backticks`.  This is the same as behaviour in comments here, but is not the behaviour I observed on [main](https://mathoverflow.net/questions/450025/do-x-and-y-have-the-same-cardinality-if-their-families-of-finite-subsets-do/450084#comment1163261_450084).

This is baffling to me!  Is there any guide to what's going on (other than reading the parser source code)?