 state_keys is a list. Trying to remove an item from a list that is not contained, raises a **ValueError**, not a KeyError. Also StateSetter.set arguments "ignore,first,last" are not properly propagated to nested calls to set, e.g. in _do_instance