Handling of loading tags

I’m trying to add a setting so that movies don’t get grouped in sets, when viewing a tag, but I can’t seem to find where in the code loading of tags is handleded.
I’ve been digging for some hours now, and I think I’ve been close. The closes (I think) I’ve come is “GetMoviesByName” where I see the “group movies in sets” setting is used.

Edit: I think I’ve been able to find where I should to this, CGUIWindowVideoBase::GetGroupedItems