Handle different VFS protocols in AnnotationDetector (#1701)