Issue #20380: More fixes for JWT generation