Fix rate limits not being applied depending on ordering of limits.

This was broken by the attempted fix in
48ad9452fdce232f054b3d9f72888820400a1c16
Merge branch 'master' into gsa