The effect of local pressure gradients and of a local flattening of the pressure profile (p' to 0) around the resonant surface of a tearing mode is investigated in toroidal geometry. It is shown that the stability index Delta ', calculated from the ideal outer region, is modified by local profile changes in a way reminiscent of the favourable curvature stabilization of linear and nonlinear tearing mode layer theory. If the width of the region of pressure flattening is of the order of the linear resistive layer width, the stabilization from the ideal outer region compensates for the loss of pressure gradient stabilization from the layer, and the overall stability of the mode is largely unaffected. For pressure flattening over a larger region, however, the mode can be strongly destabilized. Since the flattening region may then still be too small to resolve experimentally, this result implies the essential difficulty of determining the tearing mode stability of experimental profiles.