Graph cuts always find a global optimum (with a catch)