Multiple of a flat family of subschemes is flat

Let $$X$$ be a fixed curve (e.g. a Noetherian, projective scheme of dimension 1, of finite type over an algebraically closed field $$k$$) and let $$S$$ be an arbitrary parameter scheme over $$k$$. Let $$D \subset X \times S$$ be a flat family over $$S$$ of subschemes of $$X$$, of relative dimension 0 and degree $$d$$, with ideal sheaf $$\mathcal I$$.

Consider now the clolsed subscheme $$D' \subset X \times S$$ defined by the ideal $$\mathcal I^n$$. In my mind, $$D' = nD$$ in some geometric sense. Is $$D'$$ again flat over $$S$$?

• No, that is not true. Let $X$ be $\text{Spec}\ k[x,y]/\langle xy \rangle.$ Let $S$ be $\text{Spec}\ k[\epsilon]/\langle \epsilon^2 \rangle.$ Let $I$ be $\langle x,y-\epsilon\rangle.$ Then $\mathcal{O}_{X\times S}/\mathcal{I}^2$ is a direct sum of two copies of $\mathcal{O}_S$ (generated by $1$ and $y$) plus one summand $\mathcal{O}_S/\epsilon \mathcal{O}_S$ (generated by $x$). It is not $\mathcal{O}_S$-flat. – Jason Starr Oct 5 '18 at 12:22

I am just posting my comment as an answer. No, that is not true. Let $$X$$ be $$\text{Spec}\ k[t,u]/\langle tu\rangle$$. Let $$S$$ be $$\text{Spec}\ k[ϵ]/\langle ϵ^2 \rangle.$$ Let $$I$$ be $$\langle t,u−ϵ\rangle.$$ Then $$\mathcal{O}_{X×S}/I^2$$ is a direct sum of two copies of $$\mathcal{O}_S$$ (generated by $$1$$ and $$u$$) plus one summand $$\mathcal{O}_S/ϵ\mathcal{O}_S$$ (generated by $$t$$). It is not $$\mathcal{O}_S$$-flat.