For which $m$, $n$ (if any) is the following true: if $M$ and $M'$ are smooth manifolds of dimension $n$, and $\Phi$ is a bijection from $M$ to $M'$ such that for any subset $S$ of $M$, $\Phi(S)$ is an embedded submanifold of $M'$ of dimension $m$ iff $S$ is an embedded submanifold of $M$ of dimension $m$, then $\Phi$ is a diffeomorphism?
This is clearly false when $m=0$ and when $m=n$. I thought it looked plausible when, for example, $m=1$ and $n\geq 2$; but I can't see how to prove it.