Handle the possibility of recursive case class definitions.