fix Issue 12660 - Wrong non-@nogc function invariant error
fix Issue 11774 - Lambda argument to templated function changes its signature forever
Merge pull request #3589 from 9rnsr/fix11774

Issue 11774 - Lambda argument to templated function changes its signature forever
Merge pull request #3586 from 9rnsr/fix12660

Issue 12660 - Wrong non-@nogc function invariant error