WindowFeatures: Fix issue where the index could get out of range

BUG=362109

Review URL: https://codereview.chromium.org/236773005

git-svn-id: svn://svn.chromium.org/blink/trunk@172003 bbb929c8-8fbe-4397-9dbb-9b2b20218538