fix Issue 10299 - ICE with getting address of template
Merge pull request #2150 from 9rnsr/fix10299

[REG2.063] Issue 10299 - ICE with getting address of template