Make repetition use component's classList when available

otherwise the classes that get changed on an element, but not on its
component, get overwritten by the classList of the component later.