Fix a bug in blockencoding_tests
Summary:
This has been revealed by enabling the glibc++ assertions (-Wp,-D_GLIBCXX_ASSERTIONS) and running a static libstdc++ build, which happens to be the case when running the ArchLinux package builds.
Once exposed the issue is obvious, accessing an object from an out of bound vector. This doesn't cause any issue because hte memory is not freed/overriden and the vector clear() method just shrinks the capacity, but the standard lib can detect the issue.
Test Plan:
CXXFLAGS="-Wp,-D_GLIBCXX_ASSERTIONS" cmake -GNinja .. -DENABLE_STATIC_LIBSTDCXX=ON ninja all check
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D13818