I discovered an issue in the shared variable-length encoding source code - https://github.com/dotnet/runtime/pull/51486 This type doesn't have any unit tests. Some should be added to check there are no further problems.