Maybe, but source files and modules aren't 1-to-1 so that won't really fix it. The nice thing about the `parent` field is that you can get good default values for things in task-local storage without copying the dictionary for each new task.

Going by the creating task instead of the first-switching task sounds like a good idea; you're right that in general somebody might make a task, stash it in the work queue, and some random other task switches to it later.