fix Issue 13394 - invariant fail to link since 2.066 when using separate compilation
Merge pull request #3918 from 9rnsr/fix13394

[REG2.066] Issue 13394 - invariant fail to link since 2.066 when using separate compilation