Added a sanity check to make sure that the stored num_tasks is correct
Added a sanity check to make sure that the stored num_tasks is correct


Former-commit-id: ad7690d85baab5bbfd92e3511e61866d27ca2bad [formerly ad7690d85baab5bbfd92e3511e61866d27ca2bad [formerly dca75d6d71236cd6579a3a429f74b4f503dd3e82]]
Former-commit-id: fcb7f4c0d01112b61dd87da7b62f9b579835ec33
Former-commit-id: 681afa1b6c04dc2e0ced7195a2deadf2085bbb53
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine