state_diagrams: add support for indirect state changes