Fix aggregate loss curve computation

Addresses https://bugs.launchpad.net/oq-engine/+bug/1171361