ada: Fix calculation of tasks in null arrays