Changed phi to detect releveant predecessor before the visiting block (refs #198).