Use new stask_set_func API.

This new API takes care of switching the previous task and
setting this as the previous task when the task exists.
Enables previously disabled test case.