API call setvalue for is_primary does not make other values 'not primary'
There are lots of problems with the setvalue api. This is a good example of why everyone should stop using it.

The plan is to deprecate setvalue soon and remove it in a future version. See https://issues.civicrm.org/jira/browse/CRM-16643