Fix #3361, make %% coerce right operand only once

Force coercion of right operand once before doing arithmetic with it in the `__modulo` utility function.