Defect-mediated lattice relaxation and domain stability in ferroelectric oxides.