Raise an exception instead of crashing when calling deselect_all from the file selector in background mode.