Only report "app invalid" error when app could not be loaded, fixes #294.