Fixes #1542. Infinite loop in Node::IsActiveInHierarchy