The leak is probably not the rails. You may still have to drop the headliner, but you should check a couple of other options first.
Remove the rails, and scrape the old flaky sealer out of the channels on both sides. Once you have them to a solid surface, use roof cement to seal the seam. Do not make it too thick, or you will not be able to get the roof rails back in the channels. If you put the rails back before it sets up, you can "push" it to the maximum thickness. To get the nuts inside, you can pop the C pillars and the vista trim to access the nuts at the front of the side rails. Check the back corners of the vista window support for rust, while you have the side rails off. If that does not fix the leak, try some flowable silicone under the edge of the quarter glass reveal, and the sides of the vista glass reveal. The cars tend to rust at the rear corners of the vista glass, and sometimes the urethane will detach from the body around the quarter glass. The bolts did not leak at any time.
It appears that any water that comes in through the roof seams ends up in the channels formed by the sides of the headliner, and runs to the back of the car and down through the grab handles in the cargo bay.
I pulled both of my quarter glass to replace them a couple of winters ago, and found about 3 feet of the window had separated from the body around the front of the glass on the driver's side (side that was leaking). I also pulled the vista glass and it had about 3 inches of rust on the driver's side at the back (read hole), and there was a thumb size hole in each side of the back vista glass support, along with a peppering of small holes across the support.