UE-39304 crash when debugging in VS Code

My project compiles and runs fine from Visual Studio, but when I generate the project for VS Code and try to debug it from VS Code, I get that same crash, because DTTDesc.SampleDesc.Count is 1 greater than RTTDesc.SampleDesc.Count.

The associated issue Unreal Engine Issues and Bug Tracker (UE-39304) may be the result of an unrelated problem, but the crash is the same.