If $T_i$ is a covariant tensor of order 1 and $Z$ and $Z'$ denote old and new coordinate systems, such that $T_{i'} = T_{i} \frac{\partial Z^{i}}{\partial Z^{i'}}=T_i J^i_{i'}$ then I show that $\frac{\partial T_i}{\partial Z^j}$ is not a tensor this way:
\begin{align*}\frac{\partial T_{i'}}{\partial Z^{j'}} &= \frac{\partial}{\partial Z^{j'}} \left[ T_i\left(Z\left(Z'\right)\right) J^{i'}_i \right]\\ &=\frac{\partial T_i}{\partial Z^k} \frac{\partial Z^k}{\partial Z^{j'}} J^{i}_{i'} + T_i \frac{\partial J^i_{i'}}{\partial Z^{j'}}\\ &= \frac{\partial T_i}{\partial Z^k} J^k_{j'} J^i_{i'} + T_i \frac{\partial^2 Z^i}{\partial Z^{j'} \partial Z^{i'}} \end{align*} And due to the last term, this does not transform as a covariant tensor and I am done (hopefully). However, when I apply the same procedure to a contravariant tensor $T^i$:
\begin{align*}\frac{\partial T^{i'}}{\partial Z^{j'}} &= \frac{\partial}{\partial Z^{j'}} \left[ T^i\left(Z\left(Z'\right)\right) J^{i'}_{i} \right]\\ &=\frac{\partial T^i}{\partial Z^k} \frac{\partial Z^k}{\partial Z^{j'}} J_{i}^{i'} + T^i \frac{\partial J_i^{i'}}{\partial Z^{j'}}\\ &= \frac{\partial T^i}{\partial Z^k} J^k_{j'} J_i^{i'} + T^i \frac{\partial}{\partial Z^{j'}}\left( \frac{\partial Z^{i'}}{\partial Z^i}\right) \end{align*} However, the last term is different, nothing really prevents me from switching the order of partials, getting:
\begin{align*}T^i \frac{\partial}{\partial Z^{j'}}\left( \frac{\partial Z^{i'}}{\partial Z^i}\right) &= T^i \frac{\partial}{\partial Z^{i}}\left( \frac{\partial Z^{i'}}{\partial Z^{j'}}\right) \\ &= T^i \frac{\partial}{\partial Z^{i}}\left( \delta^{i'}_{j'} \right) = 0\end{align*}
which would imply that the $\frac{\partial T^i}{\partial Z^j}$ transforms as a tensor.
What is my mistake?
Note: this is from page-82 of Pavel Grinfeld's Tensor Calculus Book, Exercise 91 and a relevant question about the same problem is here but without answer to this particular mistake i am making. Another relevant question is here but it stops shy of the switching derivatives which seem to render the expression zero.