Fix too much recursion error during update_location_tree. Don't traverse...

... descendents during the all-locations update. Actually disable update_location_tree during prepopulate. Add tests for update_location_tree.
I wrote one too. Not sure if comments on lines in outdated diffs show up, so will comment at the top level.