code: function rebuildData(item) {
    if (!defined(item._regionMapping)) {
      // This can happen when you open a shared URL with displayRegionPercent defined, since that has a ko subscription above.
      return when();
    }
    item._regionMapping.isLoading = true;
    return loadConceptIdsAndConceptNameMap(item)
      .then(function() {
        return loadConcepts(item);
      })
      .then(function() {
        return loadDataFiles(item);
      })
      .then(function(tableStructuresAndCombinations) {
        item._tableStructure.columns = buildTableColumns(
          item,
          tableStructuresAndCombinations
        );
        if (item._tableStructure.columns.length === 0) {
          // Nothing to show, so the attempt to redraw will fail; need to explicitly hide the existing regions.
          item._regionMapping.hideImageryLayer();
          item.terria.currentViewer.notifyRepaintRequired();
        }
        return item._regionMapping.loadRegionDetails();
      })
      .then(function(regionDetails) {
        // Can get here with undefined region column name, hence no regionDetails.
        if (regionDetails) {
          item._regionMapping.setRegionColumnType();
          // Force a recalc of the imagery.
          // Required because we load the region details _after_ setting the active column.
          item._regionMapping.isLoading = false;
        }
        return when();
      });
  }
docs: Among other things, rebuildData is triggered when the active items are changed. This leads to double-triggering on regions: when the old item is deactivated, and when the new one is activated. Since loads are cached, it isn't a problem. It would be nice to find a way around it though.