Fixes #5059 Ignore lookup failures when templating a task name