Add a flag to check if a node is leaf.

Attempt to fix problem with active point location.