flatpak: Refactor the plugin's setup method

Clarify the code a little. This introduces no functional changes.
Status Job ID Name Coverage
  Build
passed #618665
debian-stable-x86_64

00:01:03

passed #618687
fedora-x86_64

00:02:47

failed #618664
fedora-x86_64

00:03:06