Turn the outline of a group of objects into a mask
Hello everyone! I'm looking to turn the outline of a group of objects into a mask. To illustrate, I have two groups of objects, a tree and a book, and I want the tree to have a small outline that overlaps (cuts through) the book underneath it. I've put the outline of the tree in blue, so you can see it, but I don't want the outline to be blue in the final product, of course...

Instead, I want the logo to look like the following, but I don't want to just make the outline white to match the color of the background, like I did here...

I want it to be a mask, so that any background I choose (white or otherwise), it will be the same. How can I do this? Just so you know, every time I try to turn the tree into a compound path and make a clipping mask with the book, it erases both the tree and the book, leaving just the roots, like so...

Any ideas?