Do not add the same task twice to registerTask.