Fixed issue when a job depends on another job and that job is cancelled

Signed-off-by: Daniel Dahlkvist (home) <messer_@hotmail.com>