try harder to get the exec name for flatpaks

so gnome-shell's application search does not
show zero result for an application that is
installed both by distro package and by flatpak.

Fixes issue gnome-shell#1013
8 jobs for 1013-search-evince-or-totem-zero-result-from-flatpaks in 22 minutes and 41 seconds (queued for 3 seconds)
latest
Status Job ID Name Coverage
  Build
passed #234053
cross-android_api21_arm64

00:01:10

passed #234054
cross-android_api28_arm64

00:01:08

passed #234055
cross-mingw64

00:01:37

passed #234052
fedora-x86_64

00:04:30

passed #234058
freebsd-11
freebsd-11-x86_64

00:03:44

passed #234056
win32
msys2-mingw32

00:12:13

passed #234057
win32
vs2017-x64

00:08:29

 
  Coverage
passed #234059
coverage

00:01:58

74.8%