You need to change both instances of the tab frame name in the call.
Code:
CommunitiesFrame.RosterTab:GetScript("OnClick")(CommunitiesFrame.RosterTab)
Otherwise you're calling the roster tab but passing in the info tab which then becomes "self" for the OnClick script.
Seerah's method would be better but I don't have time to rumage through the code.