The effect of induced stress heterogeneity in pore space on solid substitution