Fixes #9852 - inconsistent return value in OrderedSet
Merge pull request #9853 from aexmachina/ordered-set-returns-undefined

[bugfix beta] Fixes #9852 - Inconsistent return value in OrderedSet