Cf. https://github.com/bulletphysics/bullet3/pull/3991 (cherry picked from commit cbe0cff53dadc29735977899c69a5231cb00eff9)