Identify which DefTrees are used (including transitively) which are declared in some state but used (including transitively) in another state.
Identify which DefTrees are used (including transitively) which are declared in some state but used (including transitively) in another state.
These will need to be lifted to class members of the state machine.