Revert "Workaround Issue 11497 - lambda in "static if"/"assert" prevent ...

...inlining of function"

This reverts commit 8f10b877ead5e82e5c9a05fc2ed361ab6b08a398.

Itroduced by pull #1688. Because 11497 is now fixed.

Assigning to @AndrejMitrovic .