Fix tracking of task prnames.

Also found while debugging #603.