Add possibility to specify an intermediate aggregate value type different from
the final aggregate value type.