Fixed StateNode::calculateNodesDepth() by adding backward calculation when the state node has no forward rule node.