Solved the problem with UHS

See https://bugs.launchpad.net/oq-engine/+bug/1362649. The tests are green: https://ci.openquake.org/job/zdevel_oq-engine/630