Fix an assertion that triggered when selecting a border tile.