Editor: better handle tiles with invalid sizes.

A tile on a map can have an invalid size (i.e. not a multiple of its
pattern size) if the pattern was changed in the tileset.