This TIS is for the seal itself.
BMW TIS - 54 13 055 Replacing seal for slide/tilt sunroof frame
If you can actually avoid removing the rear window completely, it may help you out. You'll need to take out the 4 screws holding the window in place, and then reverse the front window so it retreats back into the shell. Then if you can manually lift the rear portion of the back window (the part that lifts when it vents) remove the liner in that area. After you complete that portion, you can then tilt the front portion up (so that the middle of the rear glass acts like your pivot point), the rear portion goes down and you can remove the old liner from that area and keep working your way around. I don't know why, but as long as the glass remains in at some point, it's not nearly as difficult to deal with.