private void SetCurrentBranchNodes(IList<NavigationNode> nodes)
        {
            NavigationNode currentNode;
            try
            {
                currentNode = nodes.RecursiveSelect(node => node.ChildNodes).SingleOrDefault(node => node.IsCurrentNode);
            }
            catch (InvalidOperationException)
            {
                currentNode = nodes[0];
            }

            if (currentNode != null)
            {
                var parentNode = currentNode;
                while ((parentNode != null) && (parentNode.ParentNodeId != default(Guid)))
                {
                    parentNode = nodes.RecursiveSelect(node => node.ChildNodes).SingleOrDefault(node => node.Id.Equals(parentNode.ParentNodeId));
                    if (parentNode != null)
                    {
                        parentNode.IsNodeInCurrentBranch = true;
                    }
                }
            }
        }