Fix failing rollups

This is the same thing that was happening in the MinValue class:

Rollups are occasionally failing in prod because sometimes the var `o`
is an `Integer`, and we try to cast it to be a `Long`. Which fails
of course with a `ClassCastException` exception.

Same fix as in MinValue class: use `val` instead of `o`.