for (String mod : dependingExtends) {
ModuleEnvironment env = heap.getModule(mod);
Set<String> todo = new HashSet<String>(env.getExtends());
for (String ext : todo) {
if (names.contains(ext)) {
env.unExtend(ext);
ModuleEnvironment extended = heap.getModule(ext);
if (extended != null) {
env.addExtend(ext);
}
}