Bug fix: `case class Node(children: List[Node])`
Created by: MikaelMayer
The previous hasInstance function was buggy and cannot cover the following case:
case class Node(children: List[Node])
because it originally unwrapped List[Node]
to Set(List[Node], Node)
and thus was blocked because Node was re-used.