gradle plugin: corrected a logical error in _gradle_does_task_list_need_...

Due to this error the task name cache from the gradle plugin was never used.