A Saint-Venant principle for a class of second-order elliptic boundary value problems