The B+Tree and Htree have different versions of that class. At some point, changes were made to those NodeSerializer implementation such that the Btree was using the Htree parameter semantics (addressBits, which provides a branching factor of 2^addressBits) and the Htree was using the B+Tree semantics (branching factor is given directly). This results in oversizing of the initial capacity of the buffer used by the B+Tree NodeSerializer and, for larger branching factors, triggers the exception because the initial capacity value has wrapped and become negative.
This exception was triggered using an override in the properties file for the SPO index:
A sample stack trace is present below.