I'm afraid the proposed solution does not really work: this function is not actually differentiable. I tried to figure out how on Earth it could be working, by sketching the level curves. I reorganized the function a bit, putting the questionable point at the origin and trying to simplify: for nonnegative X let g(X,y) = (y-1)^2 + h(X,y)*X where h(X,y) = +1 when y>X/2, -1 when y<0, and cos(2pi y/X) otherwise. (The goal eventually was to let X=x^2 which will basically glue the picture of level curves of g to their mirror images to give the level curves of f, slightly squished.) The problematic point is now at the origin, and you know it's problematic because the level curve g=1 passes through it and has three components: parts of two different parabolas above and below the X-axis, and then also a curve that sort of snakes to the northeast from the origin. Specifically it leaves the origin following its tangent line there, y=mX with m approximately 0.39492 (the solution to cos(2pi t)=-2t) . You know there has to be such a curve, intermediate between all the simpler level curves for positive and negative values of the function g. Anyway in the neighborhood of a point where g is differentiable and g' is nonzero, the level curves should all be approximately parallel curves; there cannot be three branches emanating from one point.
So, is g a critical point? It's easy enough to check (from the limit definition) that dg/dX = -1 and dg/dy=-2, so this is clearly not a point where g' is zero. But just because both partials exist does not make g differentiable! Differentiability is the property of being approximated by a linear function, which in this case would have to be L(X,y) = -X-2y . In particular, the only direction one ought to be able to leave the origin while staying on a level curve is in the direction of <2,-1>. Indeed, that matches the level curve in the bottom of the picture (where g(X,y) = (y-1)^2-X) but not the other two curves.
So this turns out to be a very interesting example ("grad g exists does not imply g differentiable") but not an example of the proposed phenomenon. I didn't give it much thought but I think having only one local min really does force that point to be a global min. But one does have to be careful; for example one can have "two mountains without a valley" : f(x,y)=1 - (x^2-1)^2 - (x^2y-x-1)^2 .
dave