Fixed the bug in the risk event based calculator with multiple realizations

See https://bugs.launchpad.net/oq-engine/+bug/1324086; tests running here: https://ci.openquake.org/job/zdevel_oq-engine/424