Prevent coefficient of g being -1

When the coefficient is -1 there is some weird formatting.

fix #43391

Test plan: minimal

Auditors: alpert, beneater