fix Issue 11664 - A function with a local static variable is unusable in CTFE
Merge pull request #2917 from 9rnsr/fix11664

Issue 11664 - A function with a local static variable is unusable in CTFE