also look for '}' when scanning for end-of-value
fix setting lastValue
Merge pull request #6651 from adobe/randy/issue-6649

Also look for '}' when scanning for end-of-value