Port commit 58f73d3 from wesnoth-lp8