Correctly merge the CSS classes in the `Hybrid` class (see #6601)