When specifying Session as a component and using Session flash messages, you end up with 'Paginator, Session, Session' which doesn't make sense. Added an array_unique to remove any duplicated components.
Merge pull request #4008 from davidyell/patch-3

Update ControllerTask.php