Solution (source code)

= Solution
{c}

Because $U\in[0,1]$, the conditional acceptance <probability> is $a_k=\min(1,\lambda^k)$, even when the printed threshold exceeds one. Repeating rejected trials gives the <clipped acceptance reweighting identity>:
$$
\mathbb P(X=k)=\frac{e^{-\lambda}\lambda^k a_k/k!}{\sum_{j\geq0}e^{-\lambda}\lambda^j a_j/j!}.
$$
For $0<\lambda<1$, $a_k=\lambda^k$, including $a_0=1$. The denominator is $e^{-\lambda}\sum_k\lambda^{2k}/k!=e^{\lambda^2-\lambda}$, so
$$
\boxed{X\sim
\begin{cases}
\operatorname{Poisson}(\lambda^2),&0<\lambda<1,\\
\operatorname{Poisson}(\lambda),&\lambda\geq1.
\end{cases}}
$$
For $\lambda\geq1$ every proposal is accepted, so reweighting by $\lambda^k$ would be incorrect. At $\lambda=1$ both formulas agree. Termination has <probability> one since the acceptance <probability> is $e^{\lambda^2-\lambda}>0$ in the first case and one in the second.