Fixed error checking for getCrossSectionByGroup

Just fixing a copy and paste issue from yesterday's patch.