Let $A=K[[X_1,\dots,X_n]]$ where $K$ is a field. Let $M$ be a finitely generated torsion-free $A$-module, such that

- for all $k$, the $A[1/X_k]$-module $M[1/X_k]$ is free of rank $d$;
- for every $i \neq j$, we have $M = M[1/X_i] \cap M[1/X_j]$.

Does this imply that $M$ is free?

It certainly does if $n=1$ (easy), and also if $n=2$ (reduce $M$ modulo $X$), but things seem trickier if $n \geq 3$.

This question comes up when trying to prove that some $(\varphi,\Gamma)$-modules over rings in several variables are free.