Added the ability to compose a context with a tree