Fixed deletion of tilesets that are shared with open maps

When opening a map with external tilesets, it will share those external
tilesets when they are the same as those used in already open maps. When
some error is encountered while opening such a map, these shared tilesets
should not be deleted.

This patch makes sure that the map reader will only delete the tilesets
that it created itself while loading a map.

Fixes #312