Do not generate <class> for annotations. Part of bugfix #11471.