title: navigation component popUpTo bug
body: <p>Recently I ran into issue that I asked about <a href="https://stackoverflow.com/questions/51744831/android-navigation-component-popupto-behaviour">here</a></p>
  
  <p>But when trying to figure out what's happening I always stumble on the same problem.</p>
  
  <p>Here's what I have - I have a collection, preview, edit fragments than I need to navigate between.</p>
  
  <p>But after navigating from edit fragment to preview fragment I want the back button to take user to collection fragment instead of edit fragment, and it does that, but when trying to navigate further it crashes because the destination is said to be (view_fragment). Why is that, is it some sort of bug?</p>
  
  <p><a href="https://i.stack.imgur.com/Hn5b4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Hn5b4.png" alt="enter image description here"></a></p>
  
  <p></p>
  
  <pre><code>&lt;fragment android:id="@+id/collection_fragment"&gt;
      &lt;action
          android:id="@+id/action_collection_fragment_to_view_fragment"
          app:destination="@+id/view_fragment" /&gt;
  &lt;/fragment&gt;
  
  &lt;fragment android:id="@+id/view_fragment"&gt;
      &lt;action
          android:id="@+id/action_view_fragment_to_edit_fragment"
          app:destination="@id/edit_fragment" /&gt;
      &lt;argument android:name="item" /&gt;
  &lt;/fragment&gt;
  
  &lt;fragment android:id="@+id/edit_fragment"&gt;
      &lt;action
          android:id="@+id/action_edit_fragment_to_view_fragment"
          app:destination="@id/view_fragment"
          app:popUpTo="@id/collection_fragment" /&gt;
      &lt;argument android:name="item" /&gt;
  &lt;/fragment&gt;
  </code></pre>
  
  <p></p>
  
  <p>EDIT:</p>
  
  <p>Stack trace:</p>
  
  <pre><code>java.lang.IllegalArgumentException: navigation destination com.domain.application:id/action_collection_fragment_to_view_fragment is unknown to this NavController
      at androidx.navigation.NavController.navigate(NavController.java:669)
      at androidx.navigation.NavController.navigate(NavController.java:628)
      at com.domain.application.CollectionFragment$onActivityCreated$4.onChanged(CollectionFragment.kt:126)
      at com.domain.application.CollectionFragment$onActivityCreated$4.onChanged(CollectionFragment.kt:28)
      at com.domain.application.common.SingleLiveEvent$observe$1.onChanged(SingleLiveEvent.kt:20)
      at android.arch.lifecycle.LiveData.considerNotify(LiveData.java:109)
      at android.arch.lifecycle.LiveData.dispatchingValue(LiveData.java:126)
      at android.arch.lifecycle.LiveData.setValue(LiveData.java:282)
      at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)
      at com.domain.application.common.SingleLiveEvent.setValue(SingleLiveEvent.kt:27)
      at android.arch.lifecycle.LiveData$1.run(LiveData.java:87)
      at android.os.Handler.handleCallback(Handler.java:789)
      at android.os.Handler.dispatchMessage(Handler.java:98)
      at android.os.Looper.loop(Looper.java:164)
      at android.app.ActivityThread.main(ActivityThread.java:6938)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
  </code></pre>