Get level of a given node in a tree