Issue #1601968 by DanChadwick: Fixes number step modulo rounding errors.