Currently, g_desktop_app_info_set_as_default_for_extension
creates a dummy mimetype when called, which breaks mimetype detection in many other places (see e.g. #2511, sushi#82). Here, we do this only when no existing mimetypes are registered to a file extension; otherwise we register the application for every mimetype associated with the file extension.