Handle the new representation of with-clauses in createTaskFunctions()