Doping-driven structural phase transition and loss of superconductivity in MxFe1-xSe delta (M=Mn, Cu)