Let $X$ be a smooth complex projective variety of dimension $d$. Then the Hilbert scheme of $n$ points $X^{[n]}$ is not irreducible in general, but it has always the main component $X^{[n]}_{sm}$ of smoothable subschemes: these are the finite subschemes $\xi\subseteq X$ of length $n$ that can be deformed to a collection of $n$ distinct points on $X$. Equivalently, $X^{[n]}_{curv}$ is the closure in $X^{[n]}$ of the set of $n$ distinct points in $X$.The main component $X^{[n]}_{sm}$ is irreducible and of dimension $d\cdot n$.
My question is about an open subset of this component: the subset of curvilinear subschemes. A finite subscheme $\xi \subseteq X$ is called curvilinear if it is contained in a smooth curve $C\subseteq X$ or, equivalently, if for each point $P\in \xi$ the tangent space has dimension at most one: $\dim_{\mathbb{C}} T_p\xi \leq 1$.
The curvilinear locus $X^{[n]}_{curv} \subseteq X^{[n]}$ is an open subset, and moreover it is contained in the main component $X^{[n]}_{sm}$.
Question: is it true that the curvilinear locus is a large open subset in the main component? Meaning that the complement $X^{[n]}_{sm} - X^{[n]}_{curv}$ has codimension at least two in $X^{[n]}_{sm}$.
For example, this is true if $X$ is either a curve or a surface, and it should also be true in arbitrary dimension if the number of points $n$ is at most $3$. I imagine that this has been already studied before, and I would be perfectly happy with a reference.