[REG2.065] Issue 12266 - Header generation produces uncompilable header

https://d.puremagic.com/issues/show_bug.cgi?id=12266