fix Issue 10015 - Segfault on forward referencing a variable of templated struct
Merge pull request #2708 from 9rnsr/fix10015

Issue 10015 - Segfault on forward referencing a variable of templated struct