Partial update of tests. Fix to utility function update_permission_ancestor.