Fix infinite recursion for NegativeInfinity when doing mod with a number
Merge pull request #7743 from debugger22/noo-max-recursion

Fix infinite recursion for NegativeInfinity when doing mod with a number