cope with arbitrary depth joins

limited to persons and organizations in memberships because thats all
that it makes sense to do. No resource limiting at the moment.