Fix enemy:set_can_attack(false) not always working (#149).