Fixed a NullReferenceException on TilesetBuilder export

#4506