Fixed bug with multiple tilesets

If you've got multiple tilesets, it gets the numbers wrong, and misses the "components" property. This patch fixes it.