Fix #8958.

We now do role inference on stupid datatype contexts, allowing a
lightweight role annotation syntax.
Add test case for #8950.