fixes #3363: modulo operator evaluation order