FeatureSet oldFeatures = (FeatureSet) scriptNode.getProp(Node.FEATURE_SET); FeatureSet newFeatures = oldFeatures.union(cls.features); if (!newFeatures.equals(oldFeatures)) { scriptNode.putProp(Node.FEATURE_SET, newFeatures); compiler.reportChangeToChangeScope(scriptNode);