Fixes has_changes to search all the way to leaf nodes

Fixes STUD-1841. @cahrens