Minor refactoring in state_machine.js in dealing with injected abortions.