Ok, two days later, finally got to tinker with this.
The issue is now fixed, it works great! I logged in under various people in and out of groups, and events are displaying properly. Cool deal

However! (hehe) It seems to be ignoring the $totalevents variable if you do are not part of a group that has private events. Here is what I did.
$groupshow = 0. Shows more than $totalevents in the "Upcoming Events" section...whether you are in a private group or not.
$groupshow = 1. Shows more than $totalevents in the "Upcoming Events" section, but ONLY if you are not in a private group.
$groupshow = 2. Shows more than $totalevents in the "Upcoming Events" section...whether you are in a private group or not.
Hope that makes sense. Browsing the code now to see if I can figure it out.
Thanks for the work on this.