Bugfix for: Loading tasks on the fly with TaskCollection

Since version 2.4.2, See cakephp/cakephp@c23531e806b932181cf8fbaa737ecd1ae4ec14c8