IList<GroupMap> channels = TVHome.Navigator.CurrentGroup.ReferringGroupMap();
GUIListItem item = new GUIListItem(chan.ReferencedChannel().DisplayName);
Channel selectedChannel = (channels[dlg.SelectedLabel]).ReferencedChannel();
My suggestion still stands. Delete all of your channels. Rescan. Then try. I know it is a pain, but there is probably something wrong in one of your channels. It will be hard to work out what it is.
Also, you could try searching the forum for 'repair TV database'. This will tell you how to check for faults and fix them.
Tried with TV on, same error.
I'm using default All Channels group. I just noticed I had one empty group, but deleting it did not change anything.