Merge pull request #3103 from 9rnsr/fix10133

Issue 10133 - ICE for templated static conditional lambda
Merge pull request #3162 from 9rnsr/fix11447

[REG2.065a] Issue 11447 - Closure provide bogus values
Revert "Merge pull request #3151 from 9rnsr/fix11993"

This reverts commit 5c6a973c7182d5248697de5e97550e4e3cfb8065, reversing
changes made to 1ff9600f27293f2ede5e899eb57c02f77fcd4b66.