Fixes a bug with MultiStepTaskProcessor and adds unit test for verify fix.