Not searching the entire parent task chain seems rather likely to break `source_path` quite badly: we only populate the TLS lazily and this search process is how we find the correct source path for tasks that haven't populated this entry. We should probably generalize this approach since it's quite likely to be something that will be used for other values stored in TLS.