Stop using task.session in discover plugin. refs #2825