Fix protectRoot (seems very solid now, to be tested in IE)

When protectRoot is true, root elements can only be sorted between
themselves, while children can be sorted anywhere except at a root
level.