MathJax preview does not work when editing from review (or when editing a deleted question)

Hardmath's earlier bug report made me take a closer look at the way MathJax works when editing a post from preview. Or, rather, the way it currently doesn't work.

While investigating, I also noticed a related bug: when editing a deleted question inline, MathJax also doesn't get rendered in the editor preview pane.

Both of these bugs seem to have the same cause, which I've described in my self-answer below.

Steps to reproduce:

In review:

1. Visit any review queue that gives you the option to edit the post under review. Close votes review works fine.
2. Click the "Edit" button. An inline Markdown editor should open up.
3. If the post does not have any MathJax markup in it, add some. Something trivial like $1+1=2$ should work.
4. Observe that the math is not typeset in the editor preview pane.

On a deleted question (10k+ rep only):

1. Visit any deleted question. You can find some e.g. via the 10k tools page.
2. Click the "edit" link below the question. Again, an inline editor should open.
3. Proceed as in steps 3 and 4 above.

Note: Curiously, if there are multiple deleted posts (e.g. a deleted question and its answers) on the same page, and you try to edit several of them, it seems that MathJax works in all but the first editor you open. It would appear that something in the Markdown editor code does try to automatically load the MathJax editing module when needed, but does it too late.

It's possible that this bug may also appear in other situations, but these are the two that I've confirmed so far.

The problem seems to be that the MathJax editing code is not loaded in review or on deleted question pages. This, in turn, seems to happen because those pages are missing the following inline JavaScript code that is included on normal question pages:

StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\$","\\$"]]);