Avoid scanning the classpath twice for annotations