Fix for bug # 1098658

Addresses https://bugs.launchpad.net/openquake/+bug/1098658.