grouping: Fix setting rating via overlay
Requires new functionality to check for grouping for specific model indexes
instead of currently selected ones. To that end some refactoring was necessary,
but existing function signatures have not changed.
BUG: 382677
FIXED-IN: 5.7.0