Remove a redundant variable-length array
This is the backport of !5956 (merged) to v9_16.
I have dropped the style guide and build system changes from this backport because v9_16 predates the great build system rewrite, so it seems more effort than it's worth. (The build system changes are mainly to help avoid VLAs in new code, which is mostly relevant to the main branch, so backports should already be OK.)