More proper work around for how msvc handles types in lambdas

[#74774412] @evanweaver