Issue 10492 - Illegal Instruction for mixin template with scope declarations

Decompose the declarations in the mixin (after running semantic) so scopeCode etc gets correctly run on variables.

https://issues.dlang.org/show_bug.cgi?id=10492