Fix hero freeze when a treasure's dialog is missing. Fix #595.