$(\boldsymbol{x'}\cdot\nabla)^2\boldsymbol{x}$ with $\boldsymbol{x'},\boldsymbol{x}\in \mathbb{R}^3$.
Thoughts:
$(\boldsymbol{x'}\cdot\nabla)^2= |\boldsymbol{x'}\cdot\nabla|^2= \sum \limits_{i=1}^{3} (x'_{i}\partial_{x_i})^2= \sum \limits_{i=1}^{3} (x'_{i})^2(\partial_{x_i})^2$
But what would $(\partial_{x_i})^2x_i$ mean?
Usually this notation means "apply the operator twice". If $x'$ is independent from $x$, then using the fact that $$ (v\cdot\nabla)x = v $$ for any constant $v$ we see $$ (x'\cdot\nabla)^2x = (x'\cdot\nabla)[(x'\cdot\nabla)x] = (x'\cdot\nabla)x' = 0. $$ We get $0$ at the end from assuming $x'$ is constant.
Your coordinate calculation shows the same thing since $$ \partial_{x_i}^2x_i = \partial_{x_i}(\partial_{x_i}x_i) = \partial_{x_i}1 = 0. $$