title: How is it possible that Gradle task's `outputFiles` differ when run for the first time and when it has run once already?
body: <p>When I run the below <code>build.gradle.kts</code> script, invoking target <code>downloadAndUnzipFile</code> for the first time, when I run with clean build directory, I get an error.</p>
  
  <pre><code>&gt; Task :downloadZipFile
  Download https://github.com/michel-kraemer/gradle-download-task/archive/1.0.zip
  
  [...]
  
  Execution failed for task ':downloadAndUnzipFile'.
  &gt; Cannot expand ZIP '/home/jdanek/repos/testing/gradle-infer-deps/build/downloads' as it is not a file.
  </code></pre>
  
  <p>If I rerun the same task immediately, I get success now</p>
  
  <pre><code>&gt; Task :downloadZipFile
  Download https://github.com/michel-kraemer/gradle-download-task/archive/1.0.zip
  
  &gt; Task :downloadAndUnzipFile
  
  BUILD SUCCESSFUL in 1s
  2 actionable tasks: 2 executed
  1:16:14 PM: Task execution finished 'downloadAndUnzipFile'.
  </code></pre>
  
  <p>Is this expected, or is it a bug? If it is a bug, then where? In my script?</p>
  
  <p>My <code>build.gradle.kts</code> looks like this</p>
  
  <pre><code>import de.undercouch.gradle.tasks.download.Download
  
  group = "org.example"
  version = "1.0-SNAPSHOT"
  
  plugins {
      id("de.undercouch.download").version("4.0.4")
  }
  
  tasks {
      val downloadZipFile by registering(Download::class) {
          val destDir = buildDir.resolve("downloads")
  
          doFirst {
              destDir.mkdirs()
          }
  
          src("https://github.com/michel-kraemer/gradle-download-task/archive/1.0.zip")
          dest(destDir)
      }
  
      val downloadAndUnzipFile by registering(Copy::class) {
          dependsOn(downloadZipFile)
          from(downloadZipFile.get().outputFiles.map { zipTree(it) })
          into(buildDir)
      }
  }
  </code></pre>