Fix search and index of classes with scopes