I don't know is it bug or purpose behavior, but when I Select Object or Select Same with Select Hidden Objects deselected, objects witch are in hidden groups, but their visibility in layer panel is set as visible, are selected. To exclude them from automatic selection, I have to find them in layer panel and change their visibility to hidden.