Bug #994: Modify code that updates the state and country fields on the Account and Contact object to first validate the value against the set of valid State and Country picklist codes/values, if that feature is enabled in the Org.