Merge pull request #3119 from kumpera/fix-getname-and-shadowcopy