// `expand_all`'s nested expansion respects constraints that are added after
// the `expand_all` itself.
start ::= <<with_var>>

for[T] with_var ::= <<expand_all[x[T]]>> <<x[T]>>

x[A] ::= A
x[B] ::= B

// output 0: A A
// output 1: B B
