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: dca75d6d71236cd6579a3a429f74b4f503dd3e82
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine