Do not crash on assert

I don't know if this is the right thing to do, but since it
actually crashed for me more than 10 times in a row (even when
I cleaned the preferences, the duchain, etc) it seem logical that
this *could* actually return an index from a different model,
so instead of asserting, return a invalid index.
1 job for !74 with fix_crah_projecttreeview in 47 minutes and 16 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Build
passed #21781
linux kf5-qt5 qt5.12

00:47:16

47.0%