This feature seems to be name-related, not char related.
Last week, i bought another ship for my weapon shop, and renamed another:
I renamed ship A to Ship B, then i renamed ship X to ship A. Result:
The infocard of ship A was still there, same goes for the /setmsgs.
I expected, that they are gone after renaming, and that i have to re-write infocards for both ship A and ship B, but it was only neccessary to write a new one for ship B.