# Fundamental theorem of contour integration of different paths around a neighbourhood of non-analyticity

As I understand the FToCI, the contour integral of a function with an anti-derivative over a contour that is analytic everywhere is given by:$$\oint_{x_0}^{x_1}f(z) dz = F(x_1) - F(x_0)$$ Where $x_0$ is the beginning point of the contour, and $x_1$ is the terminal point of the contour.

As I understand the Cauchy-Goursat theorem, two contours that have the same start point and terminal point, and enclose no points of non-analyticity, will have the same integral.

So here's my question: Suppose we have two contours that have the same start point and terminal point, and are analytic on both paths. However, the region they enclose isn't analytic everywhere. Cauchy-Goursat doesn't apply, both contour integrals aren't necessarily the same. According to FToCI, all that matters is the start point and end point, and thus they are the same. There's obviously a contradiction here, so what have I got wrong?

I'm sure I have an error in my understanding somewhere but I can't seem to find what exactly I've got wrong.