  On a smooth, closed Riemannian manifold $\left(M,g\right)$ of dimension
$n\ge3$, we consider the stationary Schr\"odinger equation
$\Delta_gu+h_0u=\left|u\right|^{2^*-2}u$, where
$\Delta_g:=-\text{div}_g\nabla$, $h_0\in C^1\left(M\right)$ and $2^*
:=\frac{2n}{n-2}$. We prove that, up to perturbations of the potential function
$h_0$ in $C^1\left(M\right)$, the sets of sign-changing solutions that are
bounded in $H^1\left(M\right)$ are precompact in the $C^2$ topology. We obtain
this result under the assumptions that $\left(M,g\right)$ is locally
conformally flat, $n\ge7$ and
$h_0\ne\frac{n-2}{4\left(n-1\right)}\text{Scal}_g$ at all points in $M$, where
$\text{Scal}_g$ is the scalar curvature of the manifold. We then provide
counterexamples in every dimension $n\ge3$ showing the optimality of these
assumptions.
