A small proposition in Ash's Algebra states that over a field $F$ of prime characteristic $p$, an irreducible polynomial $f$ is inseparable if and only if f' is the zero polynomial, or equivalently, $f$ is a polynomial in $X^p$.
A later exercise asks the following. Let $f$ be an irreducible polynomial in $F[X]$ where $F$ has characteristic $p\gt 0$. Express $f(X)$ as $g(X^{p^m})$ where the nonnegative interger $m$ is as large as possible. Show that $g$ is irreducible and separable.
I get that $g$ is irreducible, since $f$ is. But if $g$ is a polynomial in $X^{p^m}$ I can write it as $ g=a_0+a_1X^{p^m}+a_2(X^{p^m})^2+\cdots+a_n(X^{p^m})^n $ so g'=p^ma_1X^{p^m-1}+2p^ma_2X^{2p^m-1}+\cdots+np^ma_nX^{np^m-1}. But then each coefficient is divisible by $p$, so isn't g' identically $0$, meaning $g$ is inseparable by the proposition stated above? The provided solution states that since $m$ is maximal $g\notin F[X^p]$, (which I don't quite get, why can't $m=1$?), and so $g$ is separable, contrary to what I say. What have I done wrong here? Thanks.