MYLOC-86 preferred_location.set calls error callback if this.api is unde...

...fined.