Use the functions from the last two revisions to rebuild the layer tree whenever...