Fixed issue with Time handling unused tasks

UnusedEnd was set to point to the first pointer instead of the end,
meaning that as soon as a task is returned to the unused pile, all of the
following tasks are lost.