Merge back semantic result in originalType
fix Issue 12266 - Header generation produces uncompilable header
Tweak ddoc output