fix Issue 11081: duplicate COMDAT with failed compilation with lambdas

This patch avoids code generation for template instances with erronous parents. This mostly happens for !__traits(compiles) expressions.
At the same time it fixes mangled names for function literals used as alias template parameters.

http://d.puremagic.com/issues/show_bug.cgi?id=11081