f the GTM Proxy wants multiple GXIDs, it sends a MSG_TXN_BEGIN_GETGXID_MULTI message to the GTM. It sends a transaction count in that message.
The calculation of the range is off by one. It's perfectly possible that the proxy asks for just 1 gxid. PFA, a patch to fix that. Luckily it causes no other side effects AFAICS. Can avoid this for earlier branches.
The patch fixes the issue.