The complexity is O(N^2), so limit the size.
Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34126
Oss-Fuzz testcase for rpc fuzzer: https://github.com/bitcoin/bitcoin/files/6461382/clusterfuzz-testcase-minimized-rpc-4831734974775296.log