Looks like Visual Studio has a limitation regarding the length of folder names.
The new directory (in which I placed the copied code) name was 42 characters long. The moment I reduced its name to 20 chars the wildcard magically worked, as in the original code tree.