Fix issue with negative signs and avoid additional cancelling

Wow I hate fractions with negative signs.

Fix #58837 and other potential problems where too many factors cancel.