Fix bug with pathalogical looping with FAILED nodes.

Don't do retries if the node is FAILED. FAILED is treated same as DEAD. Otherwise we keep switching between DEAD and FAILED, and this causes a HEAL to start every 15 seconds or so. It has been tested by the original reporter of issue #1606 and it appears to have fixed the issue.
This will be merged for the 1.6 release, but I might make a small change before it's merged once I see the debug logs.