This may sound stupid but I am really confused.
Let's assume $z=g(x)$ and $y=f(x)$. The derivative of $y$ with respect to $x$ is $f'(x)$. Suppose $f'(x^*)=0$. So, $z$ at $x^{*}$ is $g(x^{*})$.
Now let's compute ${\partial z\over\partial y}$,
$${\partial z\over\partial y}=g'(x){\partial x\over\partial y}$$
$${\partial z\over\partial y}=g'(x)\frac{1}{\partial y\over\partial x}$$
So, ${\partial z\over\partial y}$ is undefined at $x^*$. That means $z$ is undefined at $x^*$ but previously we saw that $z$ at $x^{*}$ is $g(x^{*})$. What is the justification?