Gets a screen index from a given node.
This function needs to loop the Nodes, using it should be avoided for performance reasons. But there are valid cases where using a function like this cannot be avoided.
Note
There is another variation of this function which can give better performance if the index of the parent node or a node above your node is known.