src/vs/platform/extensionManagement/common/extensionGalleryService.ts/ExtensionGalleryService/getLastValidExtensionVersionRecursively
class ExtensionGalleryService:	private async getLastValidExtensionVersionRecursively(extension: IRawGalleryExtension, versions: IRawGalleryExtensionVersion[]): Promise<IRawGalleryExtensionVersion | null> {
		if (!versions.length) {
			return null;
		}

		const version = versions[0];
		const engine = await this.getEngine(version);
		if (!isEngineValid(engine, this.productService.version, this.productService.date)) {
			return this.getLastValidExtensionVersionRecursively(extension, versions.slice(1));
		}

		return {
			...version,
			properties: [...(version.properties || []), { key: PropertyType.Engine, value: engine }]
		};
	}