Fix the callback of hero:set_animation().
Access the Lua context the safe way.