Don't crash when selected tasks are removed due to background sync.