Improve the detection of uppercase classes and check if small cap glyph has correct classes