fix Issue 12981 - Can't refer to 'outer' from mixin template
Merge pull request #3700 from 9rnsr/fix12981

[REG2.008] Issue 12981 - Can't refer to 'outer' from mixin template