Reduction and decidability Consider the following language: $$ L = \{ \langle M \rangle \ |\ M \text { accepts } w \text { whenever it accepts } w^R \}$$

I am trying to understand the following proof that this language $L$ is undecidable.

The proof proceeds by contradiction, by reducing to $L$ the language  $A_{TM}=\{\langle M,w \rangle\mid M\text{ accepts }w\}$ known to be undecidable. It goes as follows:

Suppose that $L$ is decidable, then there's a TM $M_L$, that decides $L$

Thus we can build $M_{ATM}$ to decide $A_{TM}$ as follows:


Let $\langle M, w \rangle$ be an input for $M_{ATM}$.
Construct a machine, $M_1$ which on input $x$: Simulate $M$ on $w$; if $M$ rejects $w$, $reject$.  If $M$ accepts $w$, $accept$ if $x=01$, $reject$ otherwise.
Simulate $M_L$ on input $\langle M_1 \rangle$.
$accept$ if $M_L$ rejects. $reject$ otherwise.


Since $A_{TM}$ is not decidable, we have a contradiction, which implies that $L$ cannot be decidable.

However there is a point of the proof I do not understand.

My question is: What happens if $M$ gets into a loop on some $w$?
In this reduction of $A_{TM}=\{\langle M,w \rangle\mid M\text{ accepts }w\}$ to $L$, what matters in the construction of the Turing machine $M_1$ is  that the language accepted by
$M_1$ is $\{01\}$ iff $M$ accepts $w$, and is $\emptyset$
otherwise.

Whether $M$ does not halt on input $w$, or halts rejecting it, does not make any difference. In both cases, the language accepted by $M_1$ is  $\emptyset$, thus satisfyiing the definition for $L$. Hence $M_L$ will accept $\langle
M_1 \rangle$, so that $M_{ATM}$ will reject.