Fix some weird problem with how dependencies are declared in state_machine.js