Merge "StateMachine: check for null curState in dump()"