Fixed the condition in StronglyConnectedComponents Issue: SPARK-3635