Store in the permalink only modified element

Applied on layertree layer and group, needed to make the private group
visible after a login.