Unintuitive meaning of some recursive type aliases

After some testing, the following doesn’t work:

type NestedSet1[A] = A match
  case String => Nothing // used to turn of the cycle detector...
  case Nothing => Set[NestedSet1[A]]

type S = NestedSet1[Nothing]

This is really weird behavior ^^’
on scastie: