add 'leaf' attribute to nested set model