Fix bug when a type is referenced only by an other type