Fixed error where nodes that had a dependency on a node that had failed via throwing an error were still being executed. Also added a test case for this scenario.