XRPL Foundation patches ‘critical’ flaw that almost made it to mainnet