This can be simplified:

```
            if (location && location.layer) {
                var layer = this._layerMap[location.layer];
                if (layer) {
                    var wasSet = layer.set(this.data[layer.key], id, value, context, location.layerID);
                    this._dirty = this._dirty || wasSet;
                    return wasSet;
                } else {
                    return false;
                }
            } else {
                return this._performSet(id, value);
            }
```