Fix and tests for ScopedRateThrottle. Closes #935