Merge pull request #3905 from 9rnsr/fix13379

[REG2.067a] Issue 13379 - Latest dmd fails with recursive template expansion in std.regex
Merge pull request #3918 from 9rnsr/fix13394

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