Previously we would parse the string appended to an existing scope, meaning invalid scopes would not be returned as the same string. Fixes #1099