The access level of the comment's container is checked separately before this function is called. And at least in 1.8 non-members are allowed to comment public group content.

Or am I missing something?