TRUNK-2695: Testing that executing tasks are not re-scheduled. Some test...

...s fail due to a violation of a DB constraint when creating test data. To be continued.