Flatness and Cohen-Macaulay rings Let $A$ be an Artin local ring and let $f:A \to B$  a local ring homomorphism to  a Noetherian local one dimensional $A$-algebra $B$. 

If $B$ is Cohen--Macaulay and the localization of $B$ at any minimal prime is flat over $A$, then is $B$ flat over $A$? 

As far as I can see, this doesn't follow from any of the standard flatness criteria, but I could have missed something simple. 
(I am mostly interested in the case that $B$ is the localization of a finite type $A$-algebra at some maximal ideal, but it seems likely that the answer to the question is the same with or without this extra assumption.)
 A: That is not true.  Let $k$ be a field.  A module over the ring of dual numbers, $A=k[\epsilon]/\langle \epsilon^2 \rangle,$ is equivalent to a $k$-vector space $B$ with a square-zero $k$-linear self-map $L_\epsilon:B\to B.$ For every integer $q\geq 1$, the Tor module equals, $$\text{Tor}^A_{q\geq 1}(A/\langle \overline{\epsilon}\rangle,B) = H(L_\epsilon,B) = \text{Ker}(L_\epsilon)/\text{Image}(L_\epsilon).$$ Now let $B$ be the following one-dimensional, local, Noetherian $k$-algebra that is a local complete intersection, hence Cohen-Macaulay, $$B=k[x,y]_{\langle x,y \rangle}/ \langle y^2\rangle,$$ where $L_\epsilon$ is multiplication by $\overline{xy}.$
The localization of $B$ at the unique minimal prime $\mathfrak{p}=\langle \overline{y}\rangle$ is $$B_\mathfrak{p} = k(x)[y]/\langle y^2\rangle.$$  The homology module for this localization is $$H(L_\epsilon,B_{\mathfrak{p}}) = \{0\}.$$ Thus, $B_{\mathfrak{p}}$ is $A$-flat.  However, $B$ is not flat since $\text{Tor}_{q\geq 1}^A(B,A/\mathfrak{m})$ equals
$$ \text{Ker}(L_{\overline{xy}}:k[x,y]/\langle y^2\rangle \to k[x,y]/\langle y^2\rangle)/\text{Image}(L_{\overline{xy}}:k[x,y]/\langle y^2\rangle \to k[x,y]/\langle y^2\rangle) = $$ $$\langle \overline{y}\rangle / \langle \overline{xy} \rangle = k\cdot \overline{y},$$ which is one-dimensional. 
