[BUGFIX beta] Spaces in brace expansion throws an error.

Closes #4671.