allow URL helpers to work with optional scopes
Merge pull request #18022 from agrobbin/url-helpers-optional-scopes

Allow URL helpers to work with optional scopes