Correctly implement the vertex buffer checks in drawArrays …
This is half of #20599. The check for drawElements is a bit more complex to implement.