Stack overflow when calling ID3D11DeviceContext1::ClearView with more than 16 rectangles

As title. The stack overflow crash is always reproducible, and the following code sample can be used to easily reproduce the issue:

D3D11_TEXTURE2D_DESC desc2d;
ID3D11Texture2D *tex = NULL;
desc2d.Width = 128;
desc2d.Height = 128;
desc2d.MipLevels = 1;
desc2d.ArraySize = 2;
desc2d.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
desc2d.SampleDesc.Count = 1;
desc2d.SampleDesc.Quality = 0;
desc2d.Usage = D3D11_USAGE_DEFAULT;
desc2d.BindFlags = D3D11_BIND_RENDER_TARGET;
desc2d.CPUAccessFlags = 0;
desc2d.MiscFlags = 0;
dev->CreateTexture2D(&desc2d, NULL, &tex);

D3D11_RENDER_TARGET_VIEW_DESC rtvDesc;
rtvDesc.Format = DXGI_FORMAT_UNKNOWN;
rtvDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
rtvDesc.Texture2D.MipSlice = 0;
ID3D11RenderTargetView* rtv = NULL;
dev->CreateRenderTargetView(tex, &rtvDesc, &rtv);

RECT rects[20];
for (int i = 0; i < ARRAYSIZE(rects); i++) {
	rects[i].left = i;
	rects[i].top = i;
	rects[i].right = i + 1;
	rects[i].bottom = i + 1;
}
const FLOAT color[] = { 0.0, 0.0, 0.0, 0.0 };
ctx->ClearView(rtv, color, rects, ARRAYSIZE(rects));
rtv->Release();
tex->Release();