More tests, fixes to onFailure().loop and failure delegate logic