Fix problem with strongly connected components in type graph