[bug 991553] Invisible groups are visible

Function get_annotated_groups is only called from view_profile so I changed its behavior and not created another function for returning visible groups only.
If this is not appropriate i'll change the code.