Avoid an ugly error when no tasks are spawned

See https://bugs.launchpad.net/oq-engine/+bug/1334698.