Allow `task.src` property to be a function

Tests OK