Handle exceptions properly in `PySet::discard`.