Prevent adding a state if it's name is already persistent in the state machine

Also fix failing test introduced in #10