Support scopes with spaces in the name

Fixes issue #2867