Treesitter injection only works when present in first paragraph?

I’m trying to extend the markdown_inline parser to allow latex injection. So I added a new parsing rule to grammar.js—surely it’s not the best rule, but it works—adding a new node type latex, and then I added

((latex) @latex)

to my injections.scm file. And it works—as long as a latex node appears in the first paragraph of the document. If not, then the latex nodes are still present in the Playground, but the injection doesn’t take effect.

For comparison, the other injection,

((html_tag) @html)

works consistently, regardless of whether there is an html tag in the first paragraph or not.
Any thoughts about where to go from here would be very welcome. You can take a look at the code here: