Let $j: U \to X$ be a quasi-affine open embedding between schemes and $M$ be a flat quasi-coherent $O_U$-module. Is $j_*M$ flat as an $O_X$-module?
I think the answer is no in general, but: do we have a counterexample when $X$ is a smooth variety and $U$ is the complement of a smooth closed subvariety $Z$ (of codimension $\ge 2$)?