Report CLASS_OBJECT_NOT_ALLOWED for local classes