Avoid wrapping the timeout counter. Fixes GH-22.