The Cycles light linking branch is using the tree view UI but it seemed to use the "wrong" layout. It wasn't clear that the layout has to be reactivated before building the view. Make it harder to use the API wrong now by requiring the layout as argument, so the building can ensure it's active.