fix Issue 12231 - ICE on the class declaration within lambda inside template constraint