Fix Flatpak self test
I dived into the unreliable Flatpak test and this is the result, which a) makes it crash reliably and b) fixes the crash.
I could, in the same way, only update the test conditions, but I thought it'll be better to do it this way instead.