CON-1707 fix classes for elements without children