Copyright law and trademark law are different topics and have different ruling. Most software licenses (except 4 clause BSD or PHP License and few others) don't make any claims about names.
One might try to argue that a name used in software code and distributed under some open source license also gives rights to the name by being source ... but to my knowledge there are no court decisions.