Fix possible infinite recursive loop when parsing C++ headers circular dependencies.