test, `Generators::GeneratedAttribute` with references, required, index.

Closes #17197.
Closes #17207.

`{required}` is a type modifier so it should be:

    user:references{required}:index

and not:

    user:references:index{required}