Use the correct operator for 'before date' rules
Rating::build_cache: cache the correct value

The structure of the temporary $ratings array changed a while ago, but
we were still trying to pull the global rating from the old structure.