[BUGFIX release] Fixes the issue with select/each

Fixes #9436
Merge pull request #9491 from twokul/select

[BUGFIX release] Fixes the issue with select/each