Vegard's rule and volumes of formation for impurity ions