Make use of the list of Atoms in ClassSelector

Make use of the list of Atoms in the class attribute selector
(ClassSelector) in selector_matching.

Fixes #3111