Only set name when rsc name is empty AND we are not setting a name currently

Fixes #1