Dont run deps tasks recursively when they are started non-recursively

Fixes #1194