Add early errors for class elements.