Selecting a tile now highlights its pattern in the tileset view. Fix #290.

Also fix selection that was buggy since commit 690455ff.