Fix repeatable task scheduling

 * Fixed repeatable task scheduling. See bug description for
   more information.
 * Small fix in data flow test

 Fixes bug: #1301866

Change-Id: I40e653ac242df0f5deee8b72ac77a7c04e4fda2a
Merge "Fix repeatable task scheduling"