The problem is that you are asking for contour lines exactly at the minimum/maximum of a function (e.g. marching cubes/squares will want to “box-in” the contour value which is not possible if there’s no higher/lower value).
To fix it, you could just move the problematic maxima/minima to a contour value you’re not looking at e.g. by changing your mapping function from cos(Arg(z)) to cos(Arg(z)+phi). You could e.g. choose phi = 2*pi/N where N denotes your desired number of contour values. If you apply the map to both data and contour values it won’t change the appearance of your graph.