Mark an app as loaded before we start loading it

This prevent `loadApp` being called twice for the app if loading the app causes `loadApps` to be called (i.e. by triggering the filesystem setup)

cc @karlitschek @DeepDiver1975 @PVince81