When viewing the gradebook the groups to filter the results by are determined by the default grouping id set in the course settings.
In the file lib/grouplib.php the function groups_print_course_menu which is responsible for printing the group menu selector calls the function groups_get_all_groups on line 349 and 365 which passes the course's default grouping id, resulting in only groups displaying that belong to that particular default grouping. I believe the default grouping id should not be considered when displaying groups to filter by.
Fix: Pass 0 as the grouping id.
Temporary Fix: To display all groups in the select box you must change the course's setting default grouping to none.