calculus and analysis – Mathematica 12.0 returning a imaginary value for a real-valued improper integral

When I use MMA to solve this integral

Integrate((1 - Cos(x))/( 2 - Cos(x) - Cos(y)), {x, -Pi, Pi}, {y, -Pi, Pi})

it returns 8I*Pi*Log(2), which is obviously wrong.
If I iteratedly calculate it

Integrate(Integrate((1 - Cos(x))/(2 - Cos(x) - Cos(y)), {y, -Pi, Pi}), {x, -Pi, Pi})

MMA gives 2Pi^2, which is correct.
Can anybody give an explaination?