Merge pull request #1543 from seanpaultaylor/next

Fixes #1533
Fixes 1542. Infinite loop in Node::IsActiveInHierarchy