Fix wrong route detection - first wins again

Related to #534 but affect showing of uploaded files.