Fix a crash when changing the hero state in block:on_moved() (fix #340).