It is known that any morphism is flat at an open set of points. I'd like to know if there is a relative version of this fact.

Let $f: X \rightarrow Y$ and $g:Y \rightarrow S$ be morphisms of varieties, and let $h=g \circ f$ be their composition. Suppose that $h$ and $g$ are flat. Is it true that the set $\{x\in X| f|_{h ^{-1}(h(x))} : h ^{-1}(h(x)) \to g ^{-1}(h(x)) \text{ is flat at } x \}$ is open?