MODE-2002 fixed

Replaced "linear successor" check with "eventual successor" check that is recursive. Added a test case for the issue.