Added support for structs to the name annotation and fixed discriminant check names