HI,
The code above will definitely try to rename the vapp template name to the new name. Unless it is a bug.
But you are saying that the catalog name did not properly reflect that. The code will change the vapp template name and not the catalog name.
Regards,
Rajesh Kamal.