The Olympics boycott is part of a complex diplomatic balancing act.