title: Compiler sometimes can't find generated navigation files
body: <p>This is a pretty bizarre one.</p>
  <p>Occasionally, after some arbitrary change has been made to the nav graph XML, the build fails because it can't find two particular functions (nav directions) that should have been generated.</p>
  <p>The error is like this:</p>
  <pre><code>main/java/com/project/upsell/UpsellFragment.kt: (99, 82): Unresolved reference: toMainFragment
  main/java/com/project/upsell/UpsellVM: (35, 53): Unresolved reference: toSuccessFrag
  </code></pre>
  <p>I can &quot;fix&quot; it by renaming the functions, but the next time XML gets touched, the error recurs and the same &quot;fix&quot; is repeated. The same issue occurs in my environment, my teammate's environment and our Jenkins pipeline. Sometimes it builds fine locally but breaks in Jenkins.</p>
  <p>The only clue I can offer is that it started happening shortly after bringing Compose into the project.</p>
  <p>Some build info:</p>
  <pre><code>ext {
      dagger_version = '2.28.3'
      nav_version = '2.3.5'
      fragment_version = '1.3.6'
      coroutine_version = '1.5.0'
      compose_version = '1.0.1'
  }
  
  </code></pre>
  <pre><code>dependencies {
          classpath 'com.android.tools.build:gradle:4.2.2'
          classpath 'com.google.gms:google-services:4.3.8'
          classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10&quot;
          classpath &quot;androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5&quot; 
          classpath &quot;org.jetbrains.kotlin:kotlin-serialization:1.5.10&quot;
          classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
          classpath 'com.google.firebase:perf-plugin:1.4.0'
      }
  </code></pre>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  apply plugin: 'kotlin-android-extensions'
  apply plugin: &quot;kotlin-kapt&quot;
  apply plugin: &quot;androidx.navigation.safeargs.kotlin&quot;
  apply plugin: 'kotlinx-serialization'
  </code></pre>
  <pre><code> kotlinOptions {
          useIR = true
          freeCompilerArgs += ['-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi',
                               '-Xuse-experimental=kotlinx.coroutines.FlowPreview',
                               '-Xopt-in=androidx.paging.ExperimentalPagingApi',
                               '-Xuse-experimental=kotlinx.coroutines.InternalCoroutinesApi',
                               '-Xopt-in=kotlin.ExperimentalStdlibApi']
      }
  
      composeOptions {
          kotlinCompilerVersion = &quot;1.5.10&quot;
          kotlinCompilerExtensionVersion '1.0.0-rc01'
      }
  </code></pre>
  <pre><code>   buildFeatures {
          dataBinding = true
          compose = true
      }
  </code></pre>
  <p>Any insight would be appreciated</p>