private ModuleDefinition relookup(ModuleDefinition definition) {
		if (!definition.isComposed()) {
			return mainModuleRegistry.findDefinition(definition.getName(), definition.getType());
		}
		else {
			List<ModuleDefinition> children = new ArrayList<>();
			CompositeModuleDefinition composite = (CompositeModuleDefinition) definition;
			for (ModuleDefinition child : composite.getChildren()) {
				children.add(relookup(child));
			}
			return ModuleDefinitions.composed(
					composite.getName(), composite.getType(), composite.getDslDefinition(), children);
		}
	}
Recursively re-lookup module definitions from the main module registry, so that locations for simple
modules reflect the paths on the container/admin this code is running on.

@param definition the ModuleDefinition to re-lookup
@return module definition
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/module/store/ZooKeeperComposedModuleDefinitionRegistry.java