code: public int getFeaturePosition(AbstractFeature feature) {
          AbstractFeature result = feature;
          if (!featurePositions.containsKey(feature)) {
              if (feature instanceof FeatureGroup) {
                  FeatureGroup featureGroup = (FeatureGroup) feature;
                  List<Feature> features = featureGroup.getConcreteFeatures();
                  if (!features.isEmpty()) {
                      Collections.sort(features, new Comparator<Feature>() {
                          @Override
                          public int compare(Feature feat1, Feature feat2) {
                              return getFeaturePosition(feat1) - getFeaturePosition(feat2);
                          }
                      });
                      result = features.get(0);
                  }
              }
          }
          return featurePositions.getOrDefault(result, 0);
      }
docs: Returns the absolute position of the feature or create if not exists
  @param feature
  @return the absolution position of 'feature' or -1 if it is not specified