AbstractTask.setActions has no effect due to scoping

I think there is a scope-related issue when setting the actions of an AbstractTask.

The list of actions supplied as a parameter is cleared, rather than the current actions of the task.