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