Bug Fix: the check for last generator group is using incorrect current index pointer