The role of pressure flattening in calculating tearing mode stability