The effect of solid boundaries on pore shrinkage in Stokes flow