fix Issue 11081 - Win64: duplicate COMDAT with failed compilation with lambdas
Add assertion for lambda code generation
Merge pull request #2579 from 9rnsr/fix11081

[REG2.064a] Issue 11081 - Win64: duplicate COMDAT with failed compilation with lambdas