Chg nesting of resumptionToken, fixes #6435

This pull request is against 2.x, but I assume the same changes would be needed for 1.x.