Fixed bug in EntityFromTemplate and object creation in TMX parser.