Fix empty treasure in on_obtained_treasure() event if saved (fix #254).